Here are some notes about the upcoming Application Hosting services which basically defines an interface between an application and an image processing plugin. This information was mainly written having the CTK project in mind.
This extension (in DICOM called “Supplement”) for Application Hosting (Supplement 118) is currently in status letter ballot, which means that the work on the document has stopped and the DICOM committee will vote soon whether this extension will become part of DICOM or not. Since the development was done coordinated with the committee, I would expect that the vote will be positive. The Supplement text in the latest version (“letter ballot” status) can be downloaded from the NEMA server (ftp). You can keep track of any DICOM supplements (upcoming and earlier) at David Clunie's website.
The idea behind Application Hosting is to have a standardized interface to exchange information typically found in DICOM objects, e. g. images. This is done by defining a plugin mechanism. In Application Hosting, an application (“Hosting System”) can utilize a plugin (“Hosted Application”) by communication with it through a well-specified interface. One example would be a third party segmentation plugin that is instantiated by an application and then is feeded with the image-related data. The plugin may ask for further input information on the screen, then performs the segmentation and finally returns the results to the application.
An important technical aspect is that the underlying interface between Hosting System and Hosted Application does neither rely on DICOM network services nor does (by force) require any DICOM parsing capabilities. This is achieved by offering Web Services for transport, additionally to exchange of DICOM object information over DICOM files. Also, bulk data can be handed over by referring to files.
The interface includes lifecycle management (initialize, terminate, …) and data exchange management (passing data to the plugin, query status, communicate results). From the conceptual point of view, there are three interfaces:
All interfaces are based on WSDL descriptions. 1) and 2) are fairly simple. The third, Data Exchange, is a bit more sophisticated since it permits different ways to transfer meta information and bulk (pixel) data.
Data can be exchanged either by DICOM files or by a model-based mechanism that is based on XML Infosets. The second may be especially interesting for implementors that are not that common with DICOM parsing. Since the file method should be self-explanatory, I will only give a few words about the model-based one.
I am not an expert in XML technologies (DICOM is a binary hell;) If you are, skip this paragraph. XML Infosets were new to me. Basically, an XML infoset, as I understand it, is a bunch of information that could be represented by an XML file. However, that does not mean that an XML Infoset actually _is_ somewhere stored (disk, memory, somewhere) but it means that you can query it as if it would be. For that query, XPath is used which gives the ability to use existing tools. So, an XML Infoset (and you may know better than I do) is just something like an XML file abstraction.
Actually, the Application Hosting's Data Exchange interface for communication between Hosted and Hosting Application offers two different so-called Models (maybe extended in the future). One is the “Native DICOM Model” and the other is the “Abstract Multi-Dimensional Image Model”. The first one defines a representation of binary-encoded DICOM objects as XML Infosets that allows a recipient of data to navigate through a binary DICOM data set using XML-based tools (say: via XPath queries) instead of relying on toolkits that understand the binary encoding of DICOM. Every attribute of an original DICOM object is just turned into a counterpart in an XML infoset which can be accessed by XPath queries. Every XML Infoset (DICOM) attribute includes information like tag, data type, and so on. The value is transferred as a string. Since this is very inefficient for bulk data (like the DICOM attribute Pixel Data carrying the actual pixels of an image), a bulk data file link (URI) can be given instead.
The second model (the “abstract” one) is not directly derived and an underlying DICOM file structure but permits to make multi-dimensional (image) data queryable. This model does not include patient information and so on but concentrates on pixel data and describing information (spatial relationships between the different pixel data dimensions provided, or any other dependencies). Usage examples given in the supplement include 3D Grayscale Volumes or a 3D MR Metabolite Map with multiple components.
Bulk data cannot be exchanged via sharing pointers to common areas in memory. However, implementations might use file memory mapping on both sides to reach performance which is very near to the direct reading from memory. A typical bulk data exchange over such memory sharing file handles could be exist of the following steps (thanks to Larry Tarbox for clarification and example):
To implement Application Hosting related plugins the following is needed:
There is currently an implementation developed under the name XIP (eXtensible Imaging Platform). The XIP homepage offers some download and there is also a link to a pre-press book chapter on Application Hosting and XIP.