ImageGear for C and C++ on Linux v18.8 - Updated
MED_DCM_DS_TAG_ELEMENT
API Reference Guide > MD Component API Reference > MD Component Macros Reference > MED_DCM_DS_TAG_ELEMENT

This macro is used for getting the Element number out of a Tag.

Declaration:

 
Copy Code
      MED_DCM_DS_TAG_ELEMENT(Tag);

Arguments:

Tag Supply this argument with a 32-bit Tag value that begins with DCM_TAG_

Return Value:

Returns the 16-bit Element Number portion of a 32-bit Tag value.

Supported Raster Image Formats:

This function does not process image pixels.

The image must have a DICOM DataSet attached to it. Use MED_DCM_DS_exists to check whether the image contains a DataSet.

Example:

 
Copy Code
element = MED_DCM_DS_TAG_ELEMENT(DCM_TAG_IssuerOfPatientID)
/* element equals 0x0021                                */

Remarks:

Supply it with a 32-bit Tag value, and it will return the 16-bit Element Number value. The Element Number is the least significant WORD of the 32-bit Tag value.