[vtkusers] ActiViz | Changing Window Level and Window Width in a RenderWindowControl

Matias Montroull matimontg at gmail.com
Mon Feb 10 19:01:28 EST 2014


still no luck..

           vtkDICOMImageReader reader = vtkDICOMImageReader.New();
                    reader.SetFileName(ofdmulti.FileNames[0]);
                    reader.Update();

                    _ImageViewer.SetInputConnection(reader.GetOutputPort());
                    vtkRenderWindow renderWindow =
renderWindowControl1.RenderWindow;
                    vtkRenderer ren =
renderWindow.GetRenderers().GetFirstRenderer();
                    vtkRenderWindowInteractor interactor =
renderWindow.GetInteractor();
                    vtkInteractorStyleImage iteractor_image =
vtkInteractorStyleImage.New();
                    interactor.SetInteractorStyle(iteractor_image);

renderWindow.GetInteractor().SetInteractorStyle(iteractor_image);
                    renderWindow.SetInteractor(interactor);

                    _ImageViewer.SetRenderWindow(renderWindow);
                    _ImageViewer.SetSlice(0);
                    _ImageViewer.Render();


On Sat, Feb 8, 2014 at 4:17 PM, David Cole <dlrdave at aol.com> wrote:

> Don't do this:
>
>     vtkRenderWindowInteractor interactor = vtkRenderWindowInteractor.New(
> );
>
> Do this:
>
>    vtkRenderWindowInteractor interactor = renderWindow.GetInteractor();
>
> You don't need a new interactor, you just need a new interaction style
> that you push into the existing interactor.
>
>
> Good luck.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140210/7994b17a/attachment.html>


More information about the vtkusers mailing list