Example #1
0
        public override bool Stop(IMouseInformation mouseInformation)
        {
            base.Stop(mouseInformation);

            IPresentationImage selectedImage = this.Context.Viewer.SelectedPresentationImage;

            vtkGenericRenderWindowInteractor interactor = GetInteractor(selectedImage);

            if (interactor == null)
            {
                return(false);
            }

            interactor.SetEventPositionFlipY(mouseInformation.Location.X, mouseInformation.Location.Y);
            interactor.RightButtonReleaseEvent();

            return(false);
        }
Example #2
0
        private void SetRenderWindow(vtkWin32OpenGLRenderWindow win)
        {
            _vtkWin32OpenGLRW = vtkWin32OpenGLRenderWindow.SafeDownCast(win);

            if (_vtkWin32OpenGLRW != null)
            {
                vtkGenericRenderWindowInteractor iren = new vtkGenericRenderWindowInteractor();
                iren.SetRenderWindow(_vtkWin32OpenGLRW);

                vtkInteractorStyleTrackballCamera style = new vtkInteractorStyleTrackballCamera();
                iren.SetInteractorStyle(style);
                style.Dispose();

                // The control must wait to initialize the interactor until it has
                // been given a parent window. Until then, initializing the interactor
                // will always fail.

                // release our hold on interactor
                iren.Dispose();
            }
        }
Example #3
0
		private void SetRenderWindow(vtkWin32OpenGLRenderWindow win)
		{
			_vtkWin32OpenGLRW = vtkWin32OpenGLRenderWindow.SafeDownCast(win);

			if(_vtkWin32OpenGLRW != null)
			{
				vtkGenericRenderWindowInteractor iren = new vtkGenericRenderWindowInteractor();
				iren.SetRenderWindow(_vtkWin32OpenGLRW);

				vtkInteractorStyleTrackballCamera style = new vtkInteractorStyleTrackballCamera();
				iren.SetInteractorStyle(style);
				style.Dispose();

				// The control must wait to initialize the interactor until it has
				// been given a parent window. Until then, initializing the interactor
				// will always fail.

				// release our hold on interactor
				iren.Dispose();
			}
		}