How to change window level & window width of vtkInteractorStyleImage

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

How to change window level & window width of vtkInteractorStyleImage


Hello all,

I'm using using vtkImageViewer2 to display dicom images and uses custom interactor inherited  from vtkInteractorStyleImage.

And uses left mouse button down move event to modify window level and width.

I need to manually set window level and window width of the viewing image to custom value.

for this I'm using the methods

    vtkImageViewer2->SetColorLevel(double level);   

vtkImageViewer2->SetColorWindow(double width);

But, even after setting the values it is not reflecting in vtkInteractorStyleImage,

The method,

vtkInteractorStyleImage->GetWindowLevelCurrentPosition(int windolevel, int windowwidth);

returning different values than  set in vtkImageViewer2. 

Have any method to manually modify window level and window values of vtkInteractorStyleImage to custom value.

(something like SetColorLevel SetColorWindow of vtkImageViewer2)

My intention is to manually modify window values of displaying image.

Please help...

Powered by

Visit other Kitware open-source projects at

Please keep messages on-topic and check the VTK FAQ at:

Search the list archives at:

Follow this link to subscribe/unsubscribe: