/// <summary>
        /// Creating the 2D visualization window.
        /// </summary>
        /// <param name="window">Orginal window component. </param>
        public Visualization2D(RenderWindowControl window)
        {
            _window = window;
            vtkInteractorStyleImage imageStyle = vtkInteractorStyleImage.New();

            _viewer = vtkImageViewer2.New();
            _viewer.OffScreenRenderingOn();
            _window.RenderWindow.AddRenderer(_viewer.GetRenderer());
            _window.RenderWindow.GetInteractor().SetInteractorStyle(imageStyle);
            _viewer.Render();
        }
        /// <summary>
        /// Creating the 2D visualization window.
        /// </summary>
        /// <param name="window">Orginal window component. </param>
        public Visualization2D(RenderWindowControl window)
        {
            _window = window;
            vtkInteractorStyleImage imageStyle = vtkInteractorStyleImage.New();

            _viewer = vtkImageViewer2.New();
            _viewer.OffScreenRenderingOn();
            _window.RenderWindow.AddRenderer(_viewer.GetRenderer());
            _window.RenderWindow.GetInteractor().SetInteractorStyle(imageStyle);
            _viewer.Render();
        }
Esempio n. 3
0
        public Visualization2D(RenderWindowControl window, vtkDICOMImageReader dicomReader)
        {
            this.window      = window;
            this.dicomReader = dicomReader;

            vtkRenderer renderer = window.RenderWindow.GetRenderers().GetFirstRenderer();
            vtkRenderWindowInteractor renderWindowInteractor = window.RenderWindow.GetInteractor();

            viewer = vtkImageViewer2.New();
            viewer.OffScreenRenderingOn();
            viewer.SetupInteractor(renderWindowInteractor);
            viewer.SetRenderer(renderer);
        }
        public Visualization2D(RenderWindowControl window, vtkDICOMImageReader dicomReader)
        {
            this.window = window;
            this.dicomReader = dicomReader;

            vtkRenderer renderer = window.RenderWindow.GetRenderers().GetFirstRenderer();
            vtkRenderWindowInteractor renderWindowInteractor = window.RenderWindow.GetInteractor();

            viewer = vtkImageViewer2.New();
            viewer.OffScreenRenderingOn();
            viewer.SetupInteractor(renderWindowInteractor);
            viewer.SetRenderer(renderer);
        }