The conventional visualization of medical images is not enough for a rich and comprehensive electronic healthcare record. We believe that it is necessary to provide a viewer with more advanced capabilities than those of regular medical image viewers. In this paper, we propose an architecture that allows the use of contextual information to assist the healthcare professional in his regular tasks. The proposed architecture for the context is composed of an ontology describing the hospital and an inference engine. The result is a Java-based implementation of the architecture, named Dynamic N-dimensional Image Viewer, (ODIN in Portuguese) that is able to adapt its behavior according to the contextual information.