ImageGear .NET - Updated
User Guide > File Formats and Compressions > File Formats > File Formats Reference > DICOM
Full Name DICOM (Digital Imaging & Communication in Medicine)
Format ID ImGearFormats.DICOM
File Extension(s) *.dicm, *.dcm
Data Type Raster or vector image
Data Encoding Binary
Multi-Page Support Yes
Alpha Channel Support No
Metadata Update Support Page, Document
ImageGear Platforms Support WIN32, WIN64, Unix (Linux), .NET, .NET64

To support DICOM format, attach the ImageGear.Formats.DICOM Namespace to Core ImageGear.

ImageGear Supported Versions

ImageGear Supported Features

ImageGear Read Support

ImageGear also supports reading of Adobe PDF documents, encapsulated in DICOM files. See the PDF description for information on supported Adobe PDF features.

ImageGear Write Support

ImageGear Filter Control Parameters

Filter Control Parameter Type Default Value Available Values Description
DetectContinuousRLE bool true false, true Set to true for ImageGear to detect and load images where RLE runs across row boundaries. This parameter specifies what to do with RLE compressed images where RLE runs across row boundaries. If it is set to true , ImageGear tries to detect and load images where RLE runs across row boundaries. Otherwise, ImageGear truncates any row overruns and decodes each row separately. This parameter does not effect the loading of properly encoded images, where each row is encoded separately.
LoadConcatenateRepeatedDE bool false false, true Set to true to concatenate repeated data elements into one data element during loading. **
LoadDetectSkipDIMSE bool false false, true Set to false if files may contain DIMSE commands - that could throw off the format detection
LoadSavePixdataTag bool false false, true Set to true to allow loading and saving pixel data to/from the metadata tree rather than to/from ImageGear DIB.***
LoadSyntax ImGearDICOMTransferSyntaxes Enumeration AUTODETECT ImGearDICOMTransferSyntaxes Enumeration Transfer Syntax to load DCM image with.
LoadWithoutDetection bool false true,

Set to true to skip detection phase before loading a DICOM image.*
SaveAsPart10 bool true true,

true will cause the Header to be saved
SaveGroupLengths bool true true,

true =include false =exclude
SavePlanarConfig ImGearDICOMPlanarConfigurations Enumeration PIXEL_BY_PIXEL ImGearDICOMTransferSyntaxes Enumeration Planar configuration for image saving.
SaveSyntax ImGearDICOMTransferSyntaxes Enumeration DEFAULT All supported values of ImGearDICOMTransferSyntaxes Enumeration. **** Transfer Syntax to save DCM image with.

*) LoadWithoutDetection parameter affects loading of DICOM images that do not have File Meta Info (Part10) header. If false (default), the DICOM filter checks that the first several Data Elements are well formed, and if they are not, stops the reading. If true, the filter skips checking the first tags, and attempts to read the image, using the Transfer Syntax specified in the LoadSyntax parameter. LoadSyntax parameter should be set to a specific syntax, rather than AUTODETECT, PART10 or UNKNOWN. When loading the file, set loadOptions.Format to ImGearFormats.DICOM. Use this mode if you know for sure the file is a DICOM, and you know its transfer syntax.

**) Parameter LoadConcatenateRepeatedDE allows you to load incompliant DICOM images where some data elements are cut into several repeated data elements. Instead of one data element containing an array of values, the data set contains several data elements, with the same group/element numbers pair, containing portions of the array. Specifically, there are images with look up tables and palettes stored in this way. Set LoadConcatenateRepeatedDE parameter to TRUE to concatenate repeated data elements into one data element during loading. Otherwise (default), ImageGear loads all of the repeated elements in the same way as they are located in the file. Note that ImageGear does not allow saving of repeated data elements. If a data set contains repeated data elements, ImageGear will only write the first repeated element to the file.

***) When LoadSavePixdataTag is true during image loading, ImageGear does not read pixel data into a DIB, but instead creates an empty DIB and loads pixel data into Metadata Tree, so the image will not be displayed. ImageGear represents the PixelData tag in the metadata tree as either byte array or ushort array, according to Value Representation of PixelData Tag (OB or OW).

In uncompressed images this array contains uncompressed pixel data. If the image has multiple pages (frames), pixel data of all frames is concatenated in this array.

In compressed images pixel data always has value representation of OB, so ImageGear represents it as a byte array. Content of this array has rich internal structure, similar to DICOM Sequence of Items. The first item is the Basic Offset Table, which is either empty, or contains offsets to image frames within the array. The rest of items contain compressed frames. At the end of the pixel data there is the sequence delimitation item. ImageGear does not expose this structure to the application. If the application needs to access individual frames, it shall parse this byte array. See DICOM PS 3.5 - 2008, Annex A.4 "TRANSFER SYNTAXES FOR ENCAPSULATION OF ENCODED PIXEL DATA" for additional details.

If LoadSavePixdataTag parameter is true during image saving, ImageGear uses pixel data from the PixelData tag of the DICOM metadata tree, instead of the ImGearPage DIB. When saving an image in this mode, make sure that saving Transfer Syntax exactly matches the Transfer Syntax of PixelData element. If it is not so, saved image will be incompatible with the standard and most probably unreadable, because transfer syntax of the pixel data will not match transfer syntax specified in file header.

****) Currently, the following values of ImGearDICOMTransferSyntaxes Enumeration are supported:





























DICOM is a public standard created to provide a flexible and expandable means for storing, sharing, and transporting digital medical images. Today DICOM is the standard for medical imaging throughout the world.

DICOM image (alternately called Data Set) contains an ordered collection of attributes referred to as "Data Elements" that are related to one or more images. Each Data Element (DE) describes a single attribute of the image, patient, or study. The images themselves are also stored in DEs.

Each DICOM Data Set is transported through the Network, and consequently, stored in a file, using one of the defined Transfer Syntaxes. The Transfer Syntax of the DICOM file indicates whether the file uses Big Endian or Little Endian byte order, whether the image data is compressed or uncompressed, and if the DICOM Data Set uses Explicit or Implicit Value Representation (VR).

The Data Element (DE) is made up of the following parts:

Tag field identifies the type of information that is contained in the Value field (where the actual data is stored). The DICOM Data Dictionary (Part 6 of the specification) defines all possible public Data Element Tags that may be used. DICOM also allows applications to define and use private Tags and thus define their own Data Elements. Value Representation (VR) specifies the format of the Data Element Value, such as UL (unsigned long), ST (Short Text) or PN (Person Name). If Implicit Transfer Syntax is used, the VR field is omitted. It can be obtained from the standard or private Data Dictionary. Value Lenth is the lenth (in bytes) of the Data field.

DICOM also allows embedding (nesting) Data Sets within Data Sets. Nested Data Sets are implemented using a "Sequence of Items" (SQ), which is a special type of Data Element.

A special group of tags at the beginning of the file allows application to recognize the file as a DICOM image file, and includes information needed to decode the file (Transfer Syntax), and serial numbers to help locate and keep track of each field. This header is referred to as "File Meta Information Header", or "Part 10 Header" (since it is defined in Part 10 of the DICOM standard). While the standard clearly states that all DICOM image files must include a Part 10 Header, in reality one finds that many do not. Instead, the average DICOM image file is a simple data stream capture of the data into a file. This is called a "Raw Data" DICOM image file. In order to read a Raw DICOM the Transfer Syntax must be guessed at using a Transfer Syntax detection algorithm.

The actual pixel data for a DICOM image is stored in a Data Element, just like any other DICOM information. Image parameters, such as dimensions, bit depth, photometric interpretation etc., are also stored in Data Elements. The Tag for Pixel Data is called "Pixel Data" and has the Tag Number 7FE0, 0010. The Data Field in this Data Element contains all pixels for the image. Depending on the image's Transfer Syntax, the Pixel Data can be compressed or uncompressed.

See also DICOM.

References Used

Digital Imaging and Communication in Medicine (DICOM). Published by: National Electrical Manufacturers Association: .