GdPicture.NET.14.API
GdPicture14 Namespace / GdPictureImaging Class / DicomGetMinWindowLevel Method
GdPicture image identifier. The DICOM image.
Example





In This Topic
DicomGetMinWindowLevel Method (GdPictureImaging)
In This Topic
Returns the minimum window level of a DICOM image.
Syntax
'Declaration
 
Public Function DicomGetMinWindowLevel( _
   ByVal ImageID As Integer _
) As Single
public float DicomGetMinWindowLevel( 
   int ImageID
)
public function DicomGetMinWindowLevel( 
    ImageID: Integer
): Single; 
public function DicomGetMinWindowLevel( 
   ImageID : int
) : float;
public: float DicomGetMinWindowLevel( 
   int ImageID
) 
public:
float DicomGetMinWindowLevel( 
   int ImageID
) 

Parameters

ImageID
GdPicture image identifier. The DICOM image.

Return Value

The minimum window level.
Remarks
Use the GetStat() method to determine if the method succeeded.
Example
Saving the first page of a dicom document to jpeg using different window levels.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.dcm", false);
 
    // Read the dicom properties.
    float windowWidth = gdpictureImaging.DicomGetDefaultWindowWidth(imageID);
    float windowLevel = gdpictureImaging.DicomGetMinWindowLevel(imageID);
    float maxWindowLevel = gdpictureImaging.DicomGetMaxWindowLevel(imageID);
 
    // Save different views as jpeg.
    float step = (maxWindowLevel - windowLevel) / 10;
    while (windowLevel <= maxWindowLevel)
    {
        gdpictureImaging.DicomSetWindowLevel(imageID, windowWidth, windowLevel);
        gdpictureImaging.SaveAsJPEG(imageID, "image" + windowLevel.ToString() + ".jpg", 75);
        windowLevel += step;
    }
 
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also