[vtkusers] updated image from vtkImagePlaneWidget
Julien Finet
julien.finet at kitware.com
Fri Jul 4 15:20:01 EDT 2008
You can use 3 vtkImageViewer2 to display your planes in 2D:
vtkImageViewer2::SetInput(my3DImageData)
vtkImageViewer2::SetOrientation(XY or XZ or YZ)
vtkImageViewer2::SetSlice(slice)
With your 3 3D orthogonal planes, add the observers:
myOrthoPlane1->AddObserver(vtkCommand::InteractionEvent,myCallback);
myOrthoPlane2->AddObserver(vtkCommand::InteractionEvent,myCallback);
myOrthoPlane3->AddObserver(vtkCommand::InteractionEvent,myCallback);
myCallback(vtkObject* vtk_obj...)
{
vtkImagePlaneWidget* planeWidget =
vtkImagePlaneWidget::SafeDownCast(vtk_obj);
//use a mix of
planeWidget->GetPlaneOrientation()
//and a mix of
planeWidget->GetSlicePosition()
//to update your 2D imageviewer corresponding to the 3D plane widget
my2DImageViewer->SetSlice()...
}
Hope it helps,
Julien.
On Fri, Jul 4, 2008 at 3:04 PM, Dean Inglis <dean.inglis at sympatico.ca>
wrote:
> Hi David,
>
>
>
> my_vtkImageActor->SetInput( my_vtkImagePlaneWidget->GetResliceOutput() )
>
>
>
> and you may have to do other things, like add a callback to listen to the
>
> widget's InteractionEvent to tell the renderer to ResetCameraClippingRange.
>
>
>
> Dean
>
>
>
>
>
> >I've got an orthogonal rendering of some 3D data with 3
>
> >vtkImagePlaneWidgets. I'd like to be able to display each plane as a
>
> >separate 2D image which would get updated as the corresponding plane
>
> >widget is altered (if the slice index is changed, for instance).
>
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080704/bbef4c38/attachment.htm>
More information about the vtkusers
mailing list