DicomObjects.NET.8.48 Documentation
DicomObjects Namespace / DicomImage Class / Level Property

In This Topic
    Level Property (DicomImage)
    In This Topic
    The Window Level (also known as the centre) - which controls the greyscale mapping of a displayed image
    Public Property Level As System.Single
    Dim instance As DicomImage
    Dim value As System.Single
    instance.Level = value
    value = instance.Level
    public System.float Level {get; set;}
    public read-write property Level: System.Single; 
    public function get,set Level : System.float
    public: __property System.float get_Level();
    public: __property void set_Level( 
       System.float value
    property System.float Level {
       System.float get();
       void set (    System.float value);

    Property Value

    The Window Level (also known as the centre)

    Width and Level are the parameters that control the grey-scale mapping from the original pixel data to the screen. Following the normal convention, the grey scale ranges from level-width/2 to level+width/2. Note that re-scale values present in some SOP classes are used for the purposes of this mapping, but the native data are not altered, and other operations such as obtaining the Pixels are unaffected.

    Windowing using these values applies now also to colour (RGB, YBR & COLOR PALETTE images, which by default have Width=255 and Level=128)

    These values are initialised from the suggested values in the DICOM data, if present, but if not present, then reasonable initial values are calculated from the pixel data itself.

    These values are regarded as transitory, and therefore, when an image is written, they are not written back into the DICOM data. If this behaviour is required, then code similar to this should be included prior to the write:

    Image.Attributes.Add(&h0028,&h1050), Image.Level Image.Attributes.Add(&h0028,&h1051), Image.Width

    Width and Level are ignored under the following circumstances:

    • When a PresentationState is applied to the image
    • When the image contains a "Values of Interest Lookup Table" (VOILUT), as this takes the place of windowing

    In the later case, the VOI LUT can be ignored (and width and level used), by setting the image�s VOILUT property to 0.


    Target Platforms: .NET CLR 4.8 or higher

    See Also