CBMi designs applications to meet the diverse needs of many different users ranging from sophisticated research scientists to clinicians, office staff, and even patients. Recently during the development of the pediatric hearing impairment research tool, AudGenDB, we found ourselves challenged with a requirement to display anonymized medical image data inside the web browser. There were two major deployment requirements to accomodate users working in academic institutions and hospitals. First, the application needed to work in browsers as old as IE 7 as well as all major modern browsers, and second, it could not require any special privileges to run on the user’s computer. Further, we had one major feature requirement that the application support basic distance measurement. These concerns seriously limited our options.
Where to start?
Goals for StudyCentric
Our major goal in writing StudyCentric was to create an intuitive DICOM viewer suitable for research projects. It runs in both older (IE 7) and newer browsers without any plugins and uses a simple web-service to communicate with a DICOM PACS. We are currently using dcm4chee, but any PACS supporting C-Find and WADO should work. To display a DICOM study, pass the study unique identification number (UID) as part of the query string to the application’s URL. StudyCentric contains window level/width, zoom and distance measurement functionality. It is not a full PACS client nor is it approved as commercial medical device so its use is limited to research applications.
Each DICOM object at its highest level is part of a study with an associated Study Instance UID (Unique Identifier). DICOM studies are further broken up into multiple series, with each series having an associated Series Instance UID. Finally, each individual DICOM object (think image) has its own identifier called the SOP Instance UID (sometimes called Object Instance UID). All UIDs, regardless of level must be world unique. Also, while it is possible for the Series Instance UID to contain and then extend the Study Instance UID (and correspondingly, the SOP Instance UID to contain and extend the Series Instance UID), this is not required. In the PACS, every DICOM object is a file that holds all three of these identifiers. A DICOM viewer must request all the files having the same Study UID and then display them properly according to the Series UID contained in the file.
StudyCentric Implementation Details
StudyCentric uses Backbone.js to model DICOM study, series, instance hierarchy. There are three Backbone.js model definitions- Study, Series, and Instance. Along with model definitions there are two Backbone.js collection definitions- SeriesStack, and ImageStack. The Study model has one attribute that holds a SeriesStack instance, and the Series model has one attribute that holds an ImageStack. By instantiating a Study model with the Study UID provided in the query string, we can use Backbone.js to create and populate this object hierarchy.
The server component is a single-file Ruby Sinatra application that offers the front-end a REST API for finding all the DICOM objects in the requested study. The server uses the ruby-dicom library to query the PACS system. Ruby-dicom is an open-source library written completely in Ruby (with no external dependencies) that provides both DICOM file and network functionality in a sane API. Those that have worked with the DICOM network protocol may have found it to be esoteric, but the ruby-dicom API does a very nice job of hiding that complexity while still providing useful functionality. To retrieve the DICOM images, StudyCentric can be setup to speak directly to the WADO port of the PACS, or proxied through the ruby web-service. There is nothing tying the StudyCentric client to this service, and it could easily be re-implemented using another language and API (for example, Java and the dcm4che2 DICOM API).
Resources for DICOM Solutions
Depending on your requirements there are quite a few solutions out there for web-based DICOM viewers, but we hope that others working with similar goals and restrictions find StudyCentric useful. Below we share some useful resources we have found on the web for getting up to speed on DICOM.