an object-oriented client-server system for interactive segmentation of medical images using the...

6
An Object-Oriented Client-Server System for Interactive Segmentation of Medical Images Using the Generalised Active Contours Model Alan L. Scheinine, Marco Donizelli, Marco Pescosolido, Piero Pili, Andrea Giachetti, Massimiliano Tuveri and Gianluigi Zanetti {scheinin, donza, marco, piero, giach, mtuveri, zag}@crs4.it CRS4 (Center for Advanced Studies, Research and Development in Sardinia) via Nazario Sauro 10, 09123 Cagliari (Italy) Abstract. In this paper we describe the first prototype of a distributed medical imaging system suitable for the visualisation and processing of medical images. The prototype is an object- oriented client-server system that provides a complete framework for the interactive segmentation of blood vessel contours from X-Ray Computed Tomography (CT) or Magnetic Resonance Imaging (MRI) scans, using the Generalised Active Contours Model. The system has been implemented exploiting the benefits of recent software developments, such as the Java programming language and the CORBA distributed object technology, which simplify the building, the maintenance and the portability of this kind of distributed applications. 1 Introduction Beyond the immediate diagnostic value of medical images from X-Ray Computed Tomography (CT) and Magnetic Resonance Imaging (MRI), image data can be used for physical analysis and simulation. For example, the reconstruction as a geometric data set of a section of an artery could be used for medical procedural planning and for conducting research in vascular physiophathology through fluid dynamic simulations of blood flow [1]. This key role played by medical imaging has led to an increasing demand for electronic medical imaging systems (EMISs, [2]) that allow visualisation and processing of medical images. Recently, the growing demand for EMISs has been coupled with a need to access medical images and other diagnostic information remotely across networks, and to integrate and analyse data from various sources. These requirements, together with the development of data interchange standard formats such as DICOM [3], has also led to an increasing demand for distributed EMISs [4]. These systems go far beyond the original previsions of the instruments as stand-alone diagnostic workstations, and must have the capabilities to access images across networks, provide powerful image processing tools as well as image retrieval and storage mechanisms, manage various data from various sources, and integrate different software packages. Recent advances both in high-speed networks and in software developments, such as the Java programming language [5] and the CORBA distributed object technology [6], meet the needs underlying these distributed EMISs, improving their efficiency and simplifying their development, maintenance and portability. This paper describes the design and implementation of the first prototype of a distributed EMIS suitable for the visualisation and processing of medical images from different modalities. The system is characterised by an object-oriented client-server architecture that provides a complete framework for the interactive segmentation of CT or MRI scans of carotid artery sections using the Generalised Active Contour Model (GACM) [7]. The client side of the system is represented by a graphical user interface (GUI) written in Java, while a GACM-based algorithm written in C++ represents the server side. The client and the server are connected through a CORBA communication infrastructure, i.e., through a distributed object computing middleware. 2 The system requirements In the design of the proposed system, the following requirements have been considered: 1. The system GUI must be complete and usable, with all the tools useful to: retrieve medical images from different sources (raw data or graphic files, DICOM archives, URLs); visualise the images as in conventional film-based radiology; manipulate the images in order to improve their appearance, quality, or to make easier the identification of the anatomical objects under interest; interact with the GACM algorithm (due to the poor definition of medical images and the complexity of anatomical structures a user interaction is essential to guide the segmentation process [8]);

Upload: univr

Post on 29-Apr-2023

0 views

Category:

Documents


0 download

TRANSCRIPT

An Object-Oriented Client-Server System for InteractiveSegmentation of Medical Images Using the Generalised

Active Contours Model

Alan L. Scheinine, Marco Donizelli, Marco Pescosolido, Piero Pili,Andrea Giachetti, Massimiliano Tuveri and Gianluigi Zanetti

{scheinin, donza, marco, piero, giach, mtuveri, zag}@crs4.it

CRS4 (Center for Advanced Studies, Research and Development in Sardinia)via Nazario Sauro 10, 09123 Cagliari (Italy)

Abstract. In this paper we describe the first prototype of a distributed medical imaging systemsuitable for the visualisation and processing of medical images. The prototype is an object-oriented client-server system that provides a complete framework for the interactivesegmentation of blood vessel contours from X-Ray Computed Tomography (CT) or MagneticResonance Imaging (MRI) scans, using the Generalised Active Contours Model. The systemhas been implemented exploiting the benefits of recent software developments, such as theJava programming language and the CORBA distributed object technology, which simplify thebuilding, the maintenance and the portability of this kind of distributed applications.

1 Introduction

Beyond the immediate diagnostic value of medical images from X-Ray Computed Tomography (CT)and Magnetic Resonance Imaging (MRI), image data can be used for physical analysis and simulation.For example, the reconstruction as a geometric data set of a section of an artery could be used formedical procedural planning and for conducting research in vascular physiophathology through fluiddynamic simulations of blood flow [1].This key role played by medical imaging has led to an increasing demand for electronic medicalimaging systems (EMISs, [2]) that allow visualisation and processing of medical images. Recently, thegrowing demand for EMISs has been coupled with a need to access medical images and otherdiagnostic information remotely across networks, and to integrate and analyse data from varioussources. These requirements, together with the development of data interchange standard formatssuch as DICOM [3], has also led to an increasing demand for distributed EMISs [4]. These systems gofar beyond the original previsions of the instruments as stand-alone diagnostic workstations, and musthave the capabilities to access images across networks, provide powerful image processing tools aswell as image retrieval and storage mechanisms, manage various data from various sources, andintegrate different software packages. Recent advances both in high-speed networks and in softwaredevelopments, such as the Java programming language [5] and the CORBA distributed objecttechnology [6], meet the needs underlying these distributed EMISs, improving their efficiency andsimplifying their development, maintenance and portability.This paper describes the design and implementation of the first prototype of a distributed EMISsuitable for the visualisation and processing of medical images from different modalities. The system ischaracterised by an object-oriented client-server architecture that provides a complete framework forthe interactive segmentation of CT or MRI scans of carotid artery sections using the GeneralisedActive Contour Model (GACM) [7]. The client side of the system is represented by a graphical userinterface (GUI) written in Java, while a GACM-based algorithm written in C++ represents the serverside. The client and the server are connected through a CORBA communication infrastructure, i.e.,through a distributed object computing middleware.

2 The system requirements

In the design of the proposed system, the following requirements have been considered:

1. The system GUI must be complete and usable, with all the tools useful to:• retrieve medical images from different sources (raw data or graphic files, DICOM archives,

URLs);• visualise the images as in conventional film-based radiology;• manipulate the images in order to improve their appearance, quality, or to make easier the

identification of the anatomical objects under interest;• interact with the GACM algorithm (due to the poor definition of medical images and the

complexity of anatomical structures a user interaction is essential to guide the segmentationprocess [8]);

• evaluate the algorithm results and postprocess them (addition/removal of contour points,smoothing of the contour curvature, extrapolation of complex contour shapes in case thealgorithm fails).

2. The system GUI must be portable, in order to guarantee its functionalities on any platform.3. The system GUI must be flexible, in order to guarantee the efficiency of the system permitting the

implementation of time-consuming segmentation algorithms using the most appropriate fastcomputer language and, possibly, the execution on special-purpose machines.

4. The system components communication and data exchange framework must be able to work withdifferent languages and platforms.

5. The system architecture must be scalable, in order to lead the simple addition of new segmentationalgorithms or other useful system components without requiring the rewriting of the system.

3 Solution: Java and Distributed Object Technology

The Java programming language and the CORBA distributed object technology have met therequirements underlying the design of the system listed above.Java is an object-oriented programming language that has sparked over the past two yearsconsiderable interest among software developers. Besides the properties that it has in common withother OO languages (modularity, reusability, and security), three features supported by Java havebeen particularly relevant to its choice as the language used to implement the system GUI:

1. Java is a complete programming environment that provides a complete set of services andpackages that support GUI development, graphics and image retrieval, visualisation and treatment.

2. Java is a platform-independent language, so an application written in Java is completely portableand executable on any platform.

3. Java has built-in support for multi-threading programming, relevant for the efficiency of anapplication like a medical imaging system characterised by time-consuming processing algorithms.

In addition to these three properties, Java has also built-in support for TCP/IP based networking andfor distributed computing middleware (the Java Remote Method Invocation). Even if this featureguarantees the possibility of developing distributed applications using only the Java environment, adifferent technology has been chosen to implement the framework that manages the communicationamong the system components: the OMG-CORBA distributed object technology.CORBA, the Common Object Request Broker Architecture defined by the Object Management Group(OMG), specifies how software objects distributed over a network can work together without regard toclient and server operating systems and programming languages. This specification defines thefunctionality of an Object Request Broker (ORB), a software layer which allows developers to defineobjects which can be accessed over a network through clearly defined, high-level interfaces, andwhich establishes the client-server relationships between objects. Using an ORB, a client object caninvoke a method on a server object that can be on the same machine or across the network. The ORBintercepts the call and finds an object that implements the request, passes it the parameters, invokesits method, and returns the result. The client does not have to know the object’s location, neither itsprogramming language nor its operating system: the ORB takes care of all these details. In this way,the CORBA communication infrastructure automates common network programming tasks (such asobject selection, location and activation, as well as parameter marshalling and framing), therebyenhancing application flexibility [4]. In addition, an ORB can manage various servers on differenthosts, and this guarantees the complete scalability of a CORBA based distributed system. Since theJava and C++ binding of CORBA are based on the object method invocation, CORBA is completelycompatible with object-oriented languages as Java or C++, leading in this way the simple developmentof distributed application as the proposed medical system.

4 The system design and implementation

Figure 1 shows the distributed architecture of the system. The three primary components in thearchitecture are the Java GUI client, the C++ GACM algorithm that acts as a server, and the CORBAORB that manages their communication. Two secondary components are the DICOM server and the3DGEOM server, connected to the client by a TCP/IP socket protocol. Each of these components isoutlined below.

4.1 The Java GUIOn the client side of the system there is a graphical user interface written in Java. We haveimplemented it basing on standard Java packages, such as java.awt and java.awt.image, anddeveloping eight new packages containing all the GUI components, both the visual ones (fig. 2 showssome of them) and the underlying modules needed to perform the tasks required to the interface.

Figure 1. The distributed architecture of the system.

Figure 2. Some visual components of the system GUI.

C O R B A

OB JE C T

R E Q U E S T

BR OKE R

DICOM SERVER

Language: C

Host: HP C100/9000

OS: HP-UX 10.20

Java GUI CLIENT

Language: Java

Task: provide a completegraphical user interface for image

retrieval, storage, visualisationand processing

3DGEOM SERVER

Host: HP C100/9000

OS: HP-UX 10.20

Language: C

Task: retrieve image data from aDICOM archive and deliver them

to the Java GUI client

Task: obtain from the extracted contours theparametric curves useful for the 3D

geometric modelling of the carotid artery

GACM SERVER

Host: IBM 560

OS: AIX 4.1

Language: C++

Task: run theGeneralised Active

Contour Model basedalgorithm

Request Request

Result Result

TCP/IP SOCKET PROTOCOL

TCP/IP SOCKET PROTOCOL

1. Package slice: contains the components useful to retrieve, store and manage in memory theimages that form the CT or MRI scan sequence to analyse:• Slices Loader: which downloads a sequence of images from a DICOM archive. This component

includes the visual controls and the Java methods useful to establish the connection and interactwith the DICOM sever of the system. In addition, being Java able to visualise only 8-bit imagedata, it includes the controls needed to carry out the most appropriate conversion from n-bit (n =12, 16, 24) data to 8-bit data.

• Slice Loader: which downloads a single image from different sources, requiring information asthe location (path or URL) or the format (GIF/JPEG/TIFF/BMP graphic file, raw data file) of thesource. As for the Slices Loader, this component includes controls for the 8-bit conversion ofimage data.

• Slice: the component by which every loaded image with its data is stored in memory.• Slices Store: which manages in memory the entire sequence of images, allowing operations as

the adding/removal/replacement/insertion of an image.2. Package slicedisplayer: contains the components useful to visualise the images of the sequence:

• Slice Displayer: which displays an image and provides tools for performing simple imageprocessing operations (zoom, crop, rotate, flip, negative, bright, dim) and for drawinginteractively overlays on the visualised image.

• Slice Displayers Store: which manages in memory a set of Slice Displayer components (the GUIallows the contemporary presence of more than one Slice Displayer, so, for example, parallelprocessing sessions on the same image could be performed).

3. Package sequence: contains the components (Sequence Movie, Sequence Plate) useful tovisualise the images of the sequence as in conventional film-based radiology.

4. Package image: contains the components useful to display some properties (Image Histogram,Image Cross-Section, Image Pixel Values, Image Grey Levels, Image Bit-Planes, Image Statistics)and to modify interactively the appearance (Image Contrast Stretching, Image Grey-Scale Slicing,Image Intensity) of an image displayed in a Slice Displayer component.

5. Package overlay: contains the components useful to manage the creation of various types ofoverlays (box, polyline, polygon) on an image displayed in a Slice Displayer component, as well astheir modification and storage in memory.

6. Package segmentation: contains the component useful to employ the remote GACM algorithmthrough the GACM server. This component includes the visual controls and the Java methodsneeded to establish the connection and interact with the GACM server through the CORBA ORB.

7. Package postprocessing: contains the components useful to postprocess the contours extracted bythe GACM algorithm (Contour Remove Point, Contour Smoothing, Contour Extrapolation) and thecomponent including the visual controls and the Java methods needed to establish the connectionand interact with the 3DGEOM server of the system (Contour Parameterisation).

8. Package remote: contains the component that defines and implements the methods useful toperform a client/server interaction using a TCP/IP socket protocol. These methods are used in theSlices Loader and in the Contour Parameterisation components of the interface.

4.2 The GACM serverOn one server side of the system there is the GACM algorithm written in C++. We have implemented itusing the public-domain C++ library GSNAKE API [9], jointly developed by the Information TechnologyInstitute (ITI), Singapore, and the School of Applied Science, Nanyang Technological University(NTU), Singapore. We have integrated the original code with all the C++ methods needed to interactwith the Java GUI client.4.3 The communication infrastructure between the JAVA GUI client and the GACM serverA CORBA Object Request Broker manages the communication between the JAVA GUI client and theGACM server. Being in a CORBA environment, the GACM server provides services to the Java GUIclient by providing to it objects for use, and the Java GUI client exploits these services by invokingmethods on the GACM server objects with standard Java method invocation syntax. Thefunctionalities of the GACM server are specified through the functionalities of its objects, which areclearly defined through their public interface. An interface consists of operation and attribute (property)specifications, and the Interface Definition Language (IDL) is a standard language, defined by theObject Management Group, for defining such interfaces [10]. In our case, the GACM server objectsinterface specification has consisted in the definition of the methods and data types useful to make theGACM algorithm usable by the Java GUI client, that is, the definition of the methods needed to:

1. post the data concerning the image to be processed from the Java GUI client to the GACM server;

2. post the data concerning the initial contour input by the user from the Java GUI client to the GACMserver;

3. post the values of the parameters required by the GACM algorithm from the Java GUI client to theGACM server;

4. start the segmentation process;5. post the data concerning the extracted contour from the GACM server to the Java GUI client,

and of the data types related to:

1. the image to be processed;2. the contour;3. the GACM algorithm parameters.

Once defined the object interfaces in IDL, we have employed the IONA OrbixWeb IDL compiler [10]and the IONA Orbix IDL compiler [11] to produce respectively the Java classes and the C++ classescorresponding to each IDL. The classes so obtained have been then implemented and integrated intothe Java GUI client and the C++ GACM server, and their methods invocation represent the modality bywhich the Java GUI client and the GACM server interoperate through the ORB during a segmentationsession.

4.4 The DICOM server and the 3DGEOM serverIn addition to the GACM server, the Java GUI client interacts with two other servers using the TCP/IPsocket protocol: the DICOM server and the 3DGEOM server. The former is dedicated to the retrieval ofimage data from a DICOM archive and to the delivery of these data to the Java GUI. We haveimplemented it using the C programming language and employing a public-domain C library suitablefor the management of DICOM files. The latter is dedicated to the computation from the contoursextracted by the GACM algorithm of the parametric curves useful for the 3D modelling of the carotidartery. We have implemented it using the C language and the Shapes geometric computingenvironment [12], which extends traditional programming languages such as C with capabilities fordefining and processing geometric objects.

5 Results

Fig. 3 shows the contours extracted from four different CT scans of a carotid artery using thefunctionalities provided by the described system.

Figure 3. The contours extracted from four different CT scans of a carotid artery

using the functionalities provided by the described system.

From left to right, the first two images of fig. 3 represent respectively a region belonging to the primarybranch of the carotid artery and the region just before the carotid bifurcation, while the fourth imagerepresent the region just after the carotid bifurcation. In all these three cases the GACM algorithm givesatisfactory results, being able to matching correctly the shape of the carotid lumen. The third imageinstead shows the contours extracted from the scan representing the region corresponding to thecarotid bifurcation. In this case, the GACM algorithm doesn‘t give good result, because of the low CTresolution that does not fully reveal the morphology of the bifurcation. We have solved this problem byapproximating the carotid bifurcation as a pair of intersecting tubes, and then obtaining this bifurcationgeometric model through an extrapolation procedure [13], which employs the last contour of theprimary branch (second image of fig. 3) and the first two contours after the bifurcation (fourth image offig. 3) to define the bifurcation contours (leftmost image of fig. 4). In this way, combining the outputs ofthe GACM algorithm and of the extrapolation procedure, the proposed system is able to provide acomplete set of carotid sections contours, from which either the three-dimensional surface of thecarotid artery can be reconstructed and visualised (rightmost image of fig. 4), or, through thecapabilities of the 3DGEOM server, the three-dimensional finite-element mesh useful for the fluiddynamic simulations can be generated.

Figure 4. (Left) An example of bifurcation contours obtained by the extrapolation procedure.

(Right) An example of three-dimensional carotid surface reconstructed by connecting thecontours of the carotid sections using the closest points between adjacent contours.

6 Conclusions and future work

We have described the design and implementation of an object-oriented client-server system suitablefor the interactive segmentation of CT or MRI scans of carotid artery sections using the GeneralisedActive Contour Model. The system has been developed employing the Java programming languageand the CORBA distributed object technology. The good result obtained, together with the goodperformances of the system and its relative simplicity of implementation, indicate that thesetechnologies are suitable for the development of distributed medical imaging systems. The object-oriented feature of the system guarantees its simple maintenance and scalability, while the client-server architecture guarantees its efficiency, allowing the different components of the system to beimplemented using the most appropriate computer language and platform.In order to demonstrate the complete feasibility of these concepts, a wider and fully CORBA basedsystem is to be realised. This leads to the building and insertion into the system of new imageprocessing modules similar to the GACM component, and to the modification of pre-existingcomponents, such as the DICOM server and the 3DGEOM server, from C-TCP/IP applications intoC++-CORBA modules. Regarding the performances, the lacks of the system are focused in the JavaGUI client, being Java an interpreted language written to a virtual machine. Improvements in thissense can be achieved by hand-optimised Java code, but most of all by the employment of high-speedJava “just-in-time” (JIT) compilers, which translate Java bytecode into native code for the localmachine the application runs on [2].

References

[1] A. Giachetti, G. Zanetti et al., “Comparison Between Numerical Flow Simulations and MRMeasures on Glass Anastomosis Models”, submitted to Medicon 1998.

[2] P. Jain, S. Widoff, D. C. Schmidt, “The Design and Performance of MedJava”, 4th USENIXConference On Object-Oriented Technologies and Systems, Sante Fe, New Mexico, April 1998.

[3] NEMA Standard Publication PS3.X, “Digital Imaging and Communications in Medicine”, Parts 1-10, 1994.

[4] I. Pyarali, T. H. Harrison and D. C. Schmidt, “Design and Performance of an Object-OrientedFramework for High-Speed Electronic Medical Imaging”, USENIX Computing Systems Journal9(3), November/December 1996.

[5] M. Campione and K. Walrath, “The Java Tutorial: Object-Oriented Programming for the Internet”,Addison-Wesley, 1996.

[6] R. Ben-Natan, “CORBA: A Guide to Common Object Request Broker Architecture”, McGraw-Hill,1995.

[7] K. F. Lai and R. T. Chin, ”Deformable Contours: Modelling and Extraction”, IEEE Transactions onPattern Analysis and Machine Intelligence 17(11), pp. 1084-1090, 1995.

[8] G. J. Sicewright, J. M. Knapman, W. Dickson and P. J. Elliot, “Interactive Image SegmentationApplied to CT and MR Images”, Proceedings of CAR, pp. 328-333, 1993.

[9] K. F. Lai, S. Chan, C. W. Ngo, E. L. Ang and K. W. Ong, “GSnake API version 1.0: referencemanual”, 1995.

[10] IONA-OrbixWeb Programming/Reference Guide, IONA Technologies, 1996.[11] IONA-Orbix Programming/Reference Guide, IONA Technologies, 1995.[12] SHAPES Kernel Release 2.1.2 Programming/Reference Manual, XOX Corporation, 1995.[13] M. Donizelli and A. L. Scheinine, “Distributed Computational Objects for Image Segmentation”,

CRS4 Technical Report, September 1997.