ImageGear Professional for Windows ActiveX
DICOM
Full Name DICOM (Digital Imaging & Communication in Medicine)
Format ID IG_FORMAT_DCM = 48
File Extension(s) *.dicm, *.dcm
Data Type Raster or vector image
Data Encoding Binary
Color Profile Support No
ImageGear Multi-Page Support Yes
ImageGear Alpha Channel Support No
ImageGear Platforms Support WIN32, WIN64, Unix (Linux), .NET, .NET64

To support DICOM format, attach ImageGear Medical Component 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 Adobe PDF format description for information on supported Adobe PDF features.

ImageGear Write Support:

To use JPEG 2000 compression scheme, attach ImageGear JPEG 2000 Component.

To be able to load encapsulated Adobe PDF documents, attach ImageGear PDF Component.

ImageGear Filter Control Parameters:

Filter Control Parameter Type Default Value Available Values Description
DETECT_CONTINUOUS_RLE BOOL True False, True

This parameter specifies what to do with RLE compressed images where RLE runs across row boundaries.

  • If True, ImageGear tries to detect and load images where RLE runs across row boundaries.
  • If False, ImageGear truncates any row overruns and decodes each row separately.

This parameter does not affect the loading of properly encoded images, where each row is encoded separately.

LOAD_SAVE_PIXDATA_TAG BOOL False False, True

When LOAD_SAVE_PIXDATA_TAG is True, ImageGear does not read pixel data into a DIB, but rather creates an empty DIB, so the image cannot be displayed. When reading compressed image, ImageGear Medical treats PixelData tag as a Sequence, and places actual binary data into Item tags. This corresponds to the structure of compressed PixelData in DICOM files.

When using this parameter for writing, make sure that Transfer Syntax matches actual Transfer Syntax of the PixelData element.

Set to True to allow loading/saving pixel data to/from DataSet rather than to/from ImageGear DIB.

LOAD_SYNTAX

INT

MED_DCM_TS_AUTODETECT = 9998 enumIGMedTS Enumeration values

Transfer Syntax with which to load DCM image.

This parameter controls the types of DICOM files ImageGear attempts to detect. If the file that is being loaded does not fall into the category specified by this control parameter it will be ignored and a IGE_CANT_DETECT_FORMAT error will be returned.

  • MED_DCM_TS_AUTODETECT = 9998 - ImageGear attempts to determine the format of the DICOM file.
  • MED_DCM_TS_PART_10= 9997 - only files with Part 10 Header will be detected. The Transfer Syntax of the file will be determined from the header and used to load the remainder of the image file.

If you specify any standard DICOM Transfer Syntax, such as MED_DCM_TS_IMPLICIT_VR_LE or MED_DCM_TS_JPEG_LOSSY, the Medical Component will only load files having this Transfer Syntax.

LOAD_MASKALPHACHANNEL BOOL True False, True

This option controls what is done if an Alpha Channel image has been stuffed into the upper unused bits of a 16-bit image (Bits Stored < 16). These extra bits can be masked off or loaded along with the actual pixel value. If they are not masked off, you may need to alter the 16x8 LUT in order to display the image appropriately.

  • If True, the extra bits (the Alpha Channel) are masked off.
  • If False, the extra bits will be loaded into the DIB with the rest of the pixel.
LOAD_PAGENUMBER UINT 1  

This parameter is no longer supported. Instead, please use parameters of the Formats Component saving functions. See Formats Component API Reference Chapter.

Page number to load.

LOAD_CONVERTTO8G BOOL False False, True

This parameter is no longer supported. Please use medical image processing functions instead.

Convert 9-16 bit gray to 8 on load.
LOAD_DETECTSKIPDIMSE BOOL False False, True

This option controls loading process if a DICOM image contains DIMSE commands. DIMSE commands are a type of Data Element, with a group number of "0000" that are almost always removed by the DICOM network protocol before a transmitted image is saved to a disk file. However, sometimes they are found in the file and in such case ImageGear doesn't automatically recognize the file as a DICOM image. This is done because the DIMSE Tags are very difficult to differentiate from other file formats that ImageGear supports. However, if DCM_CONTROL_LOAD_DETECT_SKIP_DIMSE is set to True then the auto format detection skips over the DIMSE Tags when it attempts to decide if the file is DICOM or not.

  • If False, ImageGear will not detect DICOM image files that contain DIMSE commands.
  • If True, allow DIMSE commands and attempt to parse the file as a valid DICOM file. Set to True if files may contain DIMSE commands that could throw off the format detection.
LOAD_USE_8x8_LUT BOOL True False, True

This parameter specifies the mechanism for display contrast adjustments of 8-bit grayscale images.

  • If True, use 8x8 display LUT.
  • If False, use image's palette (the mechanism that was used in ImageGear v15.0 and earlier).
LOAD_CONCAT_REPEATED_DE BOOL False False, True

This parameter allows loading 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.

  • If True, concatenate repeated data elements into one data element during loading.
  • If False, ImageGear loads all of the repeated elements in the same way as they are located in the file.

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.

LOAD_USE_AUTO_WL_FOR_8G BOOL True False, True

This parameter affects loading of 8-bit grayscale images that do not have a VOI LUT (either a LUT sequence or window center/width values).

  • If True, use auto window/level for 8g images, if VOI LUT is not present.
  • If False, apply no window/levelling (set contrast range to 0...255).
SAVE_SYNTAX INT MED_DCM_TS_DEFAULT = 2

enumIGMedTS Enumeration values:

  • MED_DCM_TS_IMPLICIT_VR_LE = 2
  • MED_DCM_TS_EXPLICIT_VR_LE = 3
  • MED_DCM_TS_EXPLICIT_VR_BE = 4
  • MED_DCM_TS_JPEG_LOSSY = 5
  • MED_DCM_TS_JPEG_LOSSLESS = 12
  • MED_DCM_TS_JPEG_LOSSLESS_FIRSTORDER = 22
  • MED_DCM_TS_JPEG_2K_LOSSLESS_ONLY = 157
  • MED_DCM_TS_JPEG_2K = 158
  • MED_DCM_TS_RLE = 522 RLE
  • MED_DCM_TS_DEFAULT = 2
  • MED_DCM_TS_UNKNOWN = 0
  • MED_DCM_TS_PART_10 = 9997
  • MED_DCM_TS_AUTODETECT = 9998

Transfer Syntax with which to save DCM image.

This parameter controls how a DICOM file is to be formatted when it is written to disk. It does not control the file being Part 10 or Raw (see SaveAsPart10), but controls how the non-Group 2 Data Elements are formatted. It also specifies the compression that will be used for Pixel Data.

SAVE_GROUPLENGTHS BOOL True False, True

This parameter controls the usage of Group Length values during the saving of a DICOM file.

  • If True, ImageGear saves Group Length values in all Data Element groups.
  • If False, ImageGear does not save group lengths in any Data Element groups. The only exclusion is (0002, 0000) File Meta Information Group Length: if the image is saved with a File Meta Information Header, its group length is saved regardless of the SAVE_GROUPLENGTHS parameter.

Group lengths have been retired in the DICOM standard. It is recommended that you set this parameter to False.

SAVE_ASPART10 BOOL True False, True

This parameter controls whether or not Meta Information Header is saved with the file.

  • If True, the image is saved with a Part 10 header, making the file "Part 10-compliant".
  • If False, the image is saved as a raw DICOM file.
SAVE_PLANARCONFIG INT MED_DCM_PLANAR_PIXEL_BY_PIXEL MED_DCM_PLANAR_... constants

This parameter controls how the pixels are saved:

  • MED_DCM_PLANAR_PIXEL_BY_PIXEL - Pixels are saved in normal RGB order ("pixel by pixel" configuration).
  • MED_DCM_PLANAR_PLANE_BY_PLANE - Red, Blue, and Green are stored in separate planes.
SAVE_SMALLEST BOOL False False, True

This parameter controls whether ImageGear updates the Smallest Image Pixel Value (0028,0106).

  • If True, the Smallest Image Pixel Value DE (0028,0106) is set to the minimum pixel value found in the image. If the original image Data Set did not contain a Data Element for Smallest Image Pixel Value (0028,0106), ImageGear scans the image and determines a value for this DE. Smallest Image Pixel Value are included in the Data Set of the DICOM image being saved, and contains the ImageGear-determined value. The value of the DE from the original Data Set (if any) are ignored.
  • If False, ImageGear does not update the Smallest Image Pixel Value (0028,0106) when saving a DICOM image. ImageGear does not determine this value for you, and the Data Set of the image being saved does not include the Smallest Image Pixel Value Data Element. However, if the original Data Set did contain this DE, ImageGear preserves and includes it in the Data Set being saved.
SAVE_LARGEST BOOL False False, True

Controls whether Largest Image Pixel Value (0028,0107) is updated by ImageGear.

  • If True, the Largest Image Pixel value DE (0028,0107) are set to the minimum pixel value found in the image when it is saved. If the original image Data Set did not contain a Data Element for Largest Image Pixel Value (0028,0107), ImageGear scans the image and determines a value for this DE. Largest Image Pixel Value is included in the Data Set of the DICOM image being saved and contains the ImageGear-determined value. The value of the DE from the original Data Set (if any) is ignored.
  • If False, ImageGear does not update the Largest Image Pixel value DE when it saves a DICOM image. ImageGear does not determine this value for you, and the Data Set of the image being saved does not include the Largest Image Pixel Value Data Element. However, if the original Data Set did contain this DE, ImageGear preserves and includes it in the Data Set being saved.
SAVE_JPGQUALITY UINT 70 1 - 100

This parameter is no longer supported. Please use QUALITY control parameter of JPEG filter instead. Please see section in File Format Reference Chapter.

JPEG Quality setting 1-100.

Comments:

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 Length is the length (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.

References Used

Digital Imaging and Communication in Medicine (DICOM). Published by: National Electrical Manufacturers Association: http://medical.nema.org/dicom.html.

 

 


©2016. Accusoft Corporation. All Rights Reserved.

Send Feedback