[vtkusers] Re: vtkImagePlaneWidget problem on vtkImageData (C++)
Adrian Wyssmann
wyssa1 at hta-bi.bfh.ch
Fri Oct 29 10:32:56 EDT 2004
Well, that was the point! I get now a separate window. But i want to be able
to change the window-level in the "original" window. How can I set the
RenderWindow of the myImageViewer2? Or what have I to do? Her's my code:
...
myRenderWindow = vtkRenderWindow::New();
...
myRenderWindow->AddRenderer(myRenderer);
...
myRenderWindowInteractor = vtkRenderWindowInteractor::New();
myRenderWindowInteractor->SetRenderWindow(myRenderWindow);
...
myActor = vtkImageActor::New();
myActor->SetInput(myImageData);
myRenderer->AddActor(myActor);
...
myImageViewer2 = vtkImageViewer2::New();
myImageViewer2->SetupInteractor(myWindowInteractor);
myImageViewer2->SetInput(myImageData);
...
Adrian
-----Original Message-----
From: Luca Picello [mailto:luca.picello at libero.it]
Sent: Freitag, 29. Oktober 2004 12:58
To: Adrian Wyssmann
Cc: 'Dean Inglis'; 'vtkusers archive'
Subject: Re: [vtkusers] Re: vtkImagePlaneWidget problem on vtkImageData
(C++)
Not sure but usually you obtain this error with VS6 compiler when the
declaration for vtkImageViewer2 is missing.
Check you have #include "vtkImageViewer2.h" in your sources.
Bye,
Luca
Adrian Wyssmann wrote:
>In the line of the declaration of vtkImageViewer2 I get the compile
>error (using VS6):
>vtkImageViewer2* pMyImageViewer2; //c2143 sytnax error: missing ";"
>before '*'
>
>Adrian
>
>-----Original Message-----
>From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On
>Behalf Of Dean Inglis
>Sent: Donnerstag, 28. Oktober 2004 19:22
>To: vtkusers archive
>Subject: [vtkusers] Re: vtkImagePlaneWidget problem on vtkImageData
>(C++)
>
>Adrian,
>
>tyry using class vtkImageViewer2, as it was meant for 2D image display
>and has built in window-level functionality controlled by the mouse.
>vtkImagePlaneWidget is really designed to work with 3D image data.
>
>Dean
>
>
>I have a simple 2D-image (vtkImageData). I want to be able to change
>the window-level by the mouse. So I used a vtkImagePlaneWidget, which
>implements that. Actual it works, but not as expected:
>The widget seems to be like a fog over the image. Some pixels habe the
>original color, others have been set to black. If I turn the widget by
>one of it's margins, I see again the proper image.
>
>vtkImageData* myImageData;
>vtkImagePlaneWidget* = myImagePlaneWidget;
>vtkLookupTable* = myLookupTable;
>
>//initialization ...
>
>myImagePlaneWidget->SetInput(myImageData);
>myImagePlaneWidget->SetPlaneOrientation(2); //Z-Axe On();
>myImagePlaneWidget->SetSlicePosition(0);
>myImagePlaneWidget->GetLookuptable()->DeepCopy(myLookupTable);
>
>//more code ...
>
>Can anybody help?
>
>Thanks
>
>Adrian
>
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at:
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at:
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>.
>
>
>
More information about the vtkusers
mailing list