[vtkusers] vtkImageViewer --> SetColorWindow , SetColorLevel

Mathieu Malaterre mathieu.malaterre at kitware.com
Wed Aug 25 20:12:11 EDT 2004


> Hi Serhat,
> 
> With the SetColorWindow and SetColorLevel methods you can perform a gray
> scale transformation. See attach (windowlevel.jpg) for a figure that shows
> the significance of window and level. If you read in medical images in DICOM
> format, the window and level configuration of the original image are
> mentioned in the DICOM header (tags (0028,1050) and (0028,1051) ).



DICOM does not always specify those fields. In that case you can easily compute some nice values using:

GetScalarRange(min, max)
SetColorWindow(max - min )
SetColorLevel((max+min)/2)

HTH
Mathieu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: windowlevel.jpg
Type: image/jpeg
Size: 69070 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040825/c27d5094/attachment.jpg>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: replyAll
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040825/c27d5094/attachment.txt>


More information about the vtkusers mailing list