ImageGear for C and C++ on Windows v19.1 - Updated
MED_DCM_DS_preamble_set
API Reference Guide > MD Component API Reference > MD Component Functions Reference > Data Set Functions > MED_DCM_DS_preamble_set

This function sets the value of the Preamble item of the Part 10 header.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI MED_DCM_DS_preamble_set(
        const HIGEAR hIGear, 
        LPCHAR lpPreamble, 
        const DWORD bytes_in_lpPreamble
);

Arguments:

Name Type Description
hIGear const HIGEAR HIGEAR handle to the image.
lpPreamble LPCHAR A far pointer to the preamble of the Data Set.
bytes_in_lpPreamble const DWORD The number of bytes in your Preamble data.

Return Value:

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

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.

Remarks:

Provide this function with the address of the Preamble in lpPreamble, and the number of bytes for the new Preamble in bytes_in_lpPreamble. If the length of the data is less than 128 bytes, the remainder of the Preamble is filled with NULLs.