ImageGear for C and C++ on Windows v19.10 - Updated
MED_DCM_load_DICOM_FD
API Reference Guide > MD Component API Reference > MD Component Functions Reference > File Functions > MED_DCM_load_DICOM_FD

This function performs the same operation as MED_DCM_load_DICOM() except that is takes a File Descriptor (FD) and offset instead of a filename.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI MED_DCM_load_DICOM_FD(
        const AT_INT fd, 
        const LONG lOffset, 
        LPHIGEAR lphIGear, 
        const AT_MODE nSyntax, 
        const UINT page_number
);

Arguments:

Name Type Description
fd const AT_INT Set to the File Descriptor handle of the opened image file.
lOffset const LONG Set to a LONG value that gives the offset from the current position in the open file to the beginning of the DICOM data. In most cases this value will be 0.
lphIGear LPHIGEAR A far pointer which returns the HIGEAR handle for the newly loaded image.
nSyntax const AT_MODE Set to the type of Transfer Syntax used for the file that you will be loading. Use one of the MED_DCM_TS_ constants defined in enumIGMedTS.
page_number const UINT If the file is a multi-page file, you may set this variable to specify the page to load. If the file is not multi-page, set this to 1.

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++ DICOM format filter.

Remarks:

lOffset should be set to the position of the image within the file so that the ImageGear Medical knows where to begin decoding the image. If the beginning of the DICOM image file starts at the first byte, pass in an 0L for lOffset.

Since you are responsible for opening and closing the file, this function can be used to bypass the IG_load_file() limitation of not handling unicode or multi-byte character strings.