ImageGear for C and C++ on Windows v20.0 - Updated
MED_DCM_DS_create
API Reference Guide > MD Component API Reference > MD Component Functions Reference > Data Set Functions > MED_DCM_DS_create

This function creates a Data Set.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI MED_DCM_DS_create(
       HIGEAR hIGear, 
       const AT_MODE Transfer_syntax);

Arguments:

Name Type Description
hIGear HIGEAR HIGEAR handle to the image.
Transfer_syntax const AT_MODE Set this variable to the desired Transfer Syntax (TS) with which to create the Data Set. Use one of the ImageGear defined constants defined in enumIGMedTS, such as: MED_DCM_TS_IMPLICIT_VR_LE, MED_DCM_TS_EXPLICIT_VR_LE, MED_DCM_TS_EXPLICIT_VR_BE.

Return Value:

Returns the number of ImageGear errors that occurred during the function call.

Supported Raster Image Formats:

All pixel formats supported by ImageGear for C and C++.

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
HIGEAR                           hIGear;
AT_MODE                                 Transfer_syntax;
IG_load_file("image1.tif", &hIGear);
Transfer_syntax = MED_DCM_TS_IMPLICIT_VR_LE;
MED_DCM_DS_create(hIGear, Transfer_syntax);

Remarks:

If there is already a Data Set that is associated with the HIGEAR image, it will be replaced. In addition, the absolute minimum of Critical DEs (Data Elements), such as Pixel Representation and Samples per Pixel will be automatically added to the Data Set.

Below is a list of those Mandatory DEs that will be filled out automatically by this function. See Part 6:Data Dictionary of the DICOM Specification for the definitions of these DEs.

Note that there are two different Group Numbers listed below, and that the Tag numbers (the second numbers shown in the parentheses) identify which Data Element will be filled in:

 
Copy Code
        Affected DEs from Tag.group                             = 0x0028:
        (0028,0010)                     /* Rows         */
        (0028,0011)                     /* Columns              */
        (0028,0100)                     /* Bits Allocated                       */
        (0028,0101)                     /* Bits Stored                  */
        (0028,0102)                     /* High Bit                     */
        (0028,0004)                     /* Photometric Interpretation                           */
        (0028,0103)                     /* Pixel Representation                         */
        (0028,0002)                     /* Samples per pixel            */
        (0028,0006)                     /* Planar Configuration                         */
        Affected DEs from Tag.group                             = 0x7FE0;
        (7FE0,0010)                     /* Pixel Data                   */

See Working With DICOM Data Structures section for more information.

Is this page helpful?
Yes No
Thanks for your feedback.