An Introduction into Dicom using Fellow Oak

DICOM (Digital Imaging and Communication in Medicine) is probably the most common standard used for storage and exchange of Medical Images. This article provides a basic introduction on reading a Dicom File using C#.

The basic unit of a Dicom file is called an Element. Dicom Elements consists of 4 components

1. Tag
2. Value Representation
3. Value Length
4. Value Field

Tag
Tag uniquely identifies each element in the file. It consists of 2 short numbers representing the group and element.

Value Representation
Value Representation is an optional field, which defines the datatype of the element. For example,
UI – Unique Identifier
CS – Custom String
OS – Other Byte
US – Unsigned Short

Value Length
This even sized field would contain the length of the field. This field would always be even sized.

Value Field
Value Field as expected, would contain the actual value.

Reading a Dicom Element is pretty easy in C#. For this example, am using Fellow Oak Dicom Library for .Net.

Following lines of code would read the patient name out of a Dicom File using the Fellow Oak Library

 Dicom. DicomFile obj = Dicom.DicomFile .Open(FilePath);
var PatientName = obj.Dataset.Get( DicomTag.PatientName, null );

The Fellow Oak Library provides a simple interface to read all Dicom Elements.

More on Dicom in next post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s