Table of Contents

DICOM in Dart (DCMiD)

Last updated: 1200 8 May 2014

Summary

Our goal is to determine the feasibility of using binary DICOM for building brower-based medical applications. We want to design and implement a DICOM editor that reads and writes binary DICOM and displays it using HTML5, CSS3, and Google’s open source programming language, Dart. Our program should be able to parse and display binary DICOM imaging studies in less than 3 seconds.

The DICOM Standard

Learning about the structure of the DICOM Standard and its nuances was the most crucial part in writing the web application. The DICOM Standard specifies the information entity hierarchy that a DICOM file should be stored in. At the very top it specifies a Patient which has a list of Studies. The hierarchy continues through Series followed by Instance until image frames occur at the lowest level, each stored within a separate Instance. At each level there exist information attributes about the current level, as well as a list of objects at the next lowest level of the hierarchy.

The DICOM Standard also specifies the way in which each of the information entities need to be stored in memory. A binary DICOM file has a top level Dataset that contains a list of Attributes. It is important to recognize the structure of an Attribute as the lowest level of storage specification in the DICOM Standard. Every bit of information in a DICOM file is stored as an Attribute. An Attribute is structured as shown in figure 1. An Attribute contains a unique, 4 byte, identifying Tag depending on the data that is being stored in the Attribute. The Tag contains a group part and an element part each of which is 2 bytes long. An Attribute also contains a 2 or 4 byte Value Representation that specifies the encoding of the value field contents and which parser should be used to read this Attribute. Next in the Attribute is a length field that contains the length in bytes of the Value Field. Finally, the Attribute has a Value Field that stores the actual data of the Attribute.

A Value Field within an Attribute can also contain a Sequence, which is the way that an element in the top level information entity hierarchy is stored. A Study, Series, and Instance is stored as a Sequence in memory. A Sequence is defined as a list of Items and each Item contains a Dataset allowing the entire data structure to be recursive. The Dataset structure and relationships are shown in figure 2.

Figure 1

Figure 1: Structure of a DICOM Attribute

Figure 2

Figure 2: Data structure of DICOM Data

Problem

While software for viewing DICOM studies exists, the reading and writing of binary DICOM data can be improved.

Create a Zero-Footprint Web Application

Dart, Google’s new, class-based, single-inheritance, object-oriented programming language designed explicitly for creating web applications is proposed to handle this task. One goal is to demonstrate the viability of retrieving and displaying binary DICOM in a web application. Using the nested structure shown in Figure 2, the client will display DICOM data in a nested tree-table format, allowing the user to expand and collapse the information levels. A zero-footprint web client offers many advantages over traditional software applications. It allows the application to stream data and prevents the need for sensitive, HIPAA covered patient data to be stored on the end point device. It also allows the web application to be maintained and upgraded without the need for access control on the end point device, lowering management costs. There is also an opportunity for improved security since the data can be encrypted before transmission.

Decrease Development Overhead

One of the goals for the open-source DICOM web viewer was to decrease the amount of time and effort required for developers to contribute to and continue the project. The Dart programming language is a fast and intuitive tool to create and maintain the web application. Dart is similar to many object-oriented programming languages, such as Java, C++, and C#. In contrast to JavaScript, the primary language used to create web applications, Dart is easy to learn and use because it is class-based and has good library and package management functionality. Like JavaScript, it is dynamically typed and functions and their closures are first class.

Increase Parsing Speed

Increased speed of DICOM data management is significant for users such as large hospitals, which process hundreds of images daily, and regional Health Information Exchanges, that manage millions of images. As the use of medical imaging studies increases, it becomes more important to access and manipulate this data faster. Dart has an advantage over JavaScript in that it performs better on several major benchmarks.2 Native Dart is currently only supported in Google based browsers, but is also able to compile to JavaScript to run in other web browsers. Even when compiled to JavaScript through the dart2js compiler, Dart still maintains a large speed advantage over native JavaScript. The goal was to be able to parse all of the DICOM test files in under 3 seconds.

Deliverables

Technical Approach

Our first step is to learn the DICOM standard to understand how medical imaging data is stored. From this knowledge, we will design a data structure for DICOM studies. After creating a project plan which includes packages and classes for our viewer and editor, we will use Dart syntax to translate our plan into code while simultaneously unit testing each class. Once we have functional code, we will work to iteratively optimize it to achieve our goal speed.

The flowchart below is a visualization of the information pipeline that our program implements:

Dependencies

Milestones and Status

  1. Have project proposal finished and all of the programming planned and reviewed by Dr. Philbin
    • Planned: February 20
    • Status: ✔
  2. Read input (parse)
    • Planned: March 6
    • Status: ✔
  3. Write and validate output
    • Planned: March 20
    • Status: ✔
  4. HTML5/CSS3 display metadata
    • Planned: April 3
    • Status: ✔
  5. Display/Edit images
    • Planned: May 1
    • Status: Further work
  6. Final Poster Presentation
    • Planned: May 9
    • Status:✔

Reports and presentations

Project Bibliography

Other Resources and Project Files

Project code: https://bitbucket.org/ohtmiami/dicom-in-dart-dcmid

You can read more about DICOM here.

You can learn more about Google's Dart programming language here.

You can learn about the Polymer Project here.

Log

2.5.2014

2.12.2014

2.17.2014

2.18.2014

2.19.2014

2.23.2014

2.26.2014

3.2.2014

3.2.2014

3.5.2014

3.5.2014

3.10.2014

3.10.2014

3.13.2014

3.27.2014

3.28.2014

4.2.2014

4.3.2014

4.10.2014

4.14.2014

4.15.2014

4.17.2014

4.21.2014

4.22.2014

4.23.2014

4.28.2014

5.1.2014

5.5.2014

Lab Safety Certificates

dshah15_labcertificate.pdf