[vtkusers] vtkImageTracerWidget question

dean.inglis at camris.ca dean.inglis at camris.ca
Sun Jul 31 10:06:35 EDT 2005


Hi Moti,

when you change the image actor you also need to update
the widget with SetProjectionPosition:

Let's suppose you update the image actor to a new
z slice (x-y plane) location (you can also explcitly make the
actor do x-z planes and y-z planes using its SetDisplayExtent
method)


double bounds[6];
imageActor->GetBounds(bounds);
double z = bounds[4];
imageTracer->SetProjectionPosition(z);

Have a look at VTK/Examples/GUI/Tcl/ImageTracerWidget.tcl

Dean

Hello all!
i want to build a GUI which enable user to select a regin of interest from
a 3d volume visualize as 2d slices using vtkimageactor. i found the class:
vtkImageTracerWidget, however it provides only 2d selection.
do someone know how can i extend it to 3d selection, or use
vtkImageTracerWidget to each slice view (when i changed the slice
visualized by vtkimageactor::GetZSlice (int slice_num), the widget stay on
the first slice)
thanks!
moti





More information about the vtkusers mailing list