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

This function searches the Data Set of the HIGEAR image for the Window Width and Window Center Data Elements.

Declaration:

 
Copy Code
AT_ERRCOUNT ACCUAPI MED_DCM_DS_Window_Level_get_double(
        const HIGEAR hIGear,
        LPAT_DOUBLE lpWindow_Width, 
        LPAT_DOUBLE lpWindow_Center, 
        LPBOOL lpFound
);

Arguments:

Name Type Description
hIGear const HIGEAR HIGEAR handle to the image from which you would like to retrieve the Window Level values.
lpWindow_Width LPAT_DOUBLE Returns the value of the Window Level Width Data Element (0028,1051).
lpWindow_Center LPAT_DOUBLE Returns the value of the Window Level Center Data Element (0028,1050).
lpFound LPBOOL Returns TRUE if both of these DEs are found in the Data Set; returns FALSE if one or the other is missing from the Data Set. Set to NULL if you do not need this information.

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.

Example:

 
Copy Code
AT_ERRCOUNT     nErrcount;
HIGEAR          hIGear;
DOUBLE          Window_min, Window_max;
nErrcount = MED_DCM_DS_Window_Level_get_double(hIGear, &Window_min, &Window_max, NULL);

Remarks:

This function is a shortcut that was created because the values of these Data Elements are often sought after. You could perform this same operation, as you would for getting the information from any DE, by using MED_DCM_DS_move_find() and MED_DCM_DS_curr_data_get().

If both are found they are returned and lpFound is set to TRUE. If one or both of these DEs are not found, lpFound is set to FALSE and ImageGear attempts to calculate adequate values for both Width and Center to display all pixels in the image.

For 17-32 bits per pixel images, please use MED_DCM_DS_Window_Level_get_64().

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