DicomObjects Reference
DicomObjects Reference / DicomImage Object / Width Property
In This Topic
    Width Property
    In This Topic
    Description
    Controls the grey-scale mapping of a displayed image
    Property type
    Read-write property
    Syntax
    Visual Basic
    Public Property Width As Single
    Remarks

    Width and Level 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” (VOI LUT), 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.

    See Also