Reset window level and window width (vtkImagevewer2 + vtkInteractorStyleImage)
I'm using QVtkWinget+vtkImageviewer2+custom inherited vtkInteractorStyleImage to develop an DICOM imageviewer ( same as ReadDICOMSeries vtk example). The images in the series are loaded in viewer with mouse scroll. Also left mouse move changes the window level and width.
In my imageviewer i need to reset the windowlevel and window width in viewer to custom values while loading a new image in series(and also in a predefined even like Crtl+R key).
The values to be set are default values of DICOM meta data (For that I'm reading the window values from dicom meta data)
The problem is I can't reset the window level and window width values of vtkImageviewer2. I tried with vtkImageViewer2->SetColorWindow and vtkImageViewer2->SetColorLevel methods, but it working on first image only.
After that while loading the remaining image in the series (using the mouse scroll), the window level & width in viewer remaining in the last set values, later call to vtkImageViewer2->SetColorWindow and vtkImageViewer2->SetColorLevel methods not updating in viewer. (but can change the values through mouse, but intention is to change to a custom value.)
I tried with the below method after setting the window values but nothing updating the new values in viewer.
How can set custom window width and values to the vtkImageViewer2?
Where have to set it in vtkImageViewer2/ vtkInteractorStyleImage
Powered by www.kitware.com