An application of dynamic AOP to medical image generation

Medical image generation, e.g., in computer tomographs, requires the use of sophisticated algorithms in a highly sensitive application domain. These algorithms are characterized (i) by a large variability to enable generation of different types of images and (ii) a strong need for dynamic reconfiguration to adapt image generation to individual patients. These two characteristics suggest the use of AOP techniques to manage variability which is akin to a crosscutting functionality and to enable dynamic reconfiguration. In this paper we present three results related to AOP and medical imaging in the context of medical devices from Siemens AG, Germany: (i) a motivation why imaging software for medical tomographs can benefit from dynamic AOP, (ii) a case study of how system software for medical devices can be adapted using the Arachne system for dynamic AOP in C, and (iii) a detailed presentation of the underlying Arachne implementation and the design of its extension to C++. 1. MOTIVATION: MEDICAL IMAGE GENERATION AND AOP Many medical devices (e.g., magnetic resonance or computer tomography devices) require the generation of images based on measurements from the human body. The corresponding signal processing consists in the decomposition of the input signals yielded at certain points of time into signals corresponding to all the positions within a space cube representing the scanned 3-dimensional image (see Fig. 1). The signal specific to a particular position within the cube is characterized by its periodicity (i.e. cosine and sine waves), Part of this work has been done during the author’s stay at Ecole des Mines de Nantes. Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. DAW@AOSD ’05 Chicago, USA Copyright 2005 EMN/INRIA, Siemens. Figure 1: Space cube of measured signals associated with a human body part frequency, phase and amplitude. The mathematical tool underlying such image generation tasks is Fourier transformation. In medical scanners, measurement data is typically stored within a raw data cube consisting of lines, columns and slices. A position in this cube is determined by its three dimensions and represents one measured signal. On the other hand this cube also represents the part of the human body which is examined. The state of human tissue at a position, is calculated by application of a sequence of basic image calculation steps to the measured raw data. These steps filter and adjust received signals, calculate images and post-process images. In the existing software for devices of Siemens AG the entire image generation transformations are constructed from approx. 60 different basic image processing functors. The set of valid transformations, i.e., valid orderings according to which these basic functors may be combined, can be conceptually represented using a graph with one start and end node. The start node receives the measured signals and the end node yields a generated image. In practice, the devices are used as follows. A concrete transformation needs to be configured before the start of a measurement for a patient. Currently, doctors execute one of a set of complete functor sequences generating an image for a patient, followed by other complete sequences, if necessary, for the same patient. However, based on corresponding customer requests, an evaluation is performed within Siemens medical devices unit of explicit support for