[vtkusers] Automatic ColorWindow and ColorLevel setting?

Goodwin Lawlor goodwin.lawlor.lists at gmail.com
Thu Mar 6 05:04:59 EST 2014


Hi,

Some applications suggest "preset" values for window/level that the user
can choose for certain types of images or modalities.

See volview, for example: http://www.kitware.com/opensource/volview.html

Initially, you can set the whole of the image range to map to the whole of
the value range [0,1]

Something like:

    imageReader->Update();

    double range[2];
    imageReader->GetOutput()->GetPointData()->GetScalars()->GetRange(range);

    double window = range[1] - range[0];
    double level = range[0] + (window/2.0);

    viewer->SetColorWindow(window);
    viewer->SetColorLevel(level);

hth

Goodwin


On Wed, Mar 5, 2014 at 10:03 AM, kidane <hiliwi.leake at gmail.com> wrote:

> Hi there,
>
> I am trying to develop robust DICOM series viewer using VTK to visualize
> MRI
> and PET series.
>
> I almost did most of the implementation but I am facing a problem with the
> setting of the ColorWindow and ColorLevel. every time I have to adjust
> these
> levels when I open a different series or shifted from MRI to PET.
>
> could some one help me if there is a way to synchronize the values of
> ColorWindow and ColorLevel with the current series and set the value based
> on that so that I can view any series with out changing the levels
> manually?
>
> thanks in advance!!!
>
>
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Automatic-ColorWindow-and-ColorLevel-setting-tp5726196.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140306/ea8df67d/attachment.html>


More information about the vtkusers mailing list