ImageGear Professional > API Reference Guide > MD Component API Reference > MD Component Functions Reference > Data Set Functions > MED_DCM_DS_Window_Level_get |
This function searches the Data Set of the HIGEAR image for the Window Width and Window Center Data Elements.
Copy Code
|
|
---|---|
AT_ERRCOUNT ACCUAPI MED_DCM_DS_Window_Level_get(
const HIGEAR hIGear,
LPLONG lpWindow_Width,
LPLONG lpWindow_Center,
LPBOOL lpFound
);
|
Name | Type | Description |
hIGear | const HIGEAR | HIGEAR handle to the image from which you would like to retrieve the Window Level values. |
lpWindow_Width | LPLONG | Returns the value of the Window Level Width Data Element (0028,1051). |
lpWindow_Center | LPLONG | 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. |
Returns the number of ImageGear errors that occurred during the function call.
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. |
Copy Code
|
|
---|---|
AT_ERRCOUNT nErrcount; HIGEAR hIGear; LONG lWindow_min, lWindow_max; nErrcount = MED_DCM_DS_Window_Level_get(hIGear, &lWindow_min, &lWindow_max, NULL); |
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().