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

In This Topic
    Width Property (DicomImage)
    In This Topic
    The Window "Width" - which controls the greyscale mapping of a displayed image
    Public Property Width As System.Single
    Dim instance As DicomImage
    Dim value As System.Single
    instance.Width = value
    value = instance.Width
    public System.float Width {get; set;}
    public read-write property Width: System.Single; 
    public function get,set Width : System.float
    public: __property System.float get_Width();
    public: __property void set_Width( 
       System.float value
    property System.float Width {
       System.float get();
       void set (    System.float value);

    Width and Levels 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