[vtkusers] VTK Interactor Unwanted Zoom

goodsit2 goodsije at live.com
Sun Nov 25 17:38:58 EST 2012


I have a scroll bar or wheel scroll which updates my image and sets a new
slice for the window. But as I increase the slice, the zoom increases as
well even though I do not forward events. I'm not exactly sure why this is
happening. Below is some code snipets:

//header file
class DicomInteractorStyleImage : public vtkInteractorStyleImage
{
public:
   static DicomInteractorStyleImage* New();
   vtkTypeMacro(DicomInteractorStyleImage, vtkInteractorStyleImage);

   .
   .
   .
   //public stuff, protected stuff, private stuff
   .
   .
   .
   protected:
   virtual void OnMouseWheelForward();
   virtual void OnMouseWheelBackward();
}

//Source File
.
.
.
void DicomInteractorStyleImage::sliderSetSlice(int Slice)
{
    if(Slice <= _MaxSlice && Slice >= _MinSlice) 
	{
            _Slice = Slice;
            _ImageViewer->SetSlice(_Slice);
            _ImageViewer->Render();
        }
}
.
.
.

So basically, if the slider moves or if the mouse wheel scrolls, it ultimate
calls the member function above. The image changes and zooms when I call
SetSlice. I'm not sure why it zooms when this is called. I'm wondering if
the series is being read improperly.

Thanks!

Jeremy



--
View this message in context: http://vtk.1045678.n5.nabble.com/VTK-Interactor-Unwanted-Zoom-tp5717280.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list