DicomObjects.NetStandard 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
    Syntax
    'Declaration
     
    
    Public Property Width As Single
    'Usage
     
    
    Dim instance As DicomImage
    Dim value As Single
     
    instance.Width = value
     
    value = instance.Width
    public float Width {get; set;}
    public:
    property float Width {
       float get();
       void set (    float value);
    }
    Remarks

    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.

    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also