[vtkusers] How to draw on the surface of 3D volume using vtkImageTracerWidge

dean.inglis at camris.ca dean.inglis at camris.ca
Tue Nov 22 18:24:25 EST 2005


Hi,

vtkImageTracerWidget is designed to work on 2D images.
You could use a vtkImageActor to display one slice at
a time: x-y plane, x-z plane or y-z plane, and
set the tracer widget with (ProjectToPlaneOn, SetProp(an_image_actor))
SetProjectionNormal (normal to plane you draw on) and SetProjectionPosition.
You can then store each polydata that the tracer draws
on the plane of the image actor with, for example, vtkAppendPolyData.
I'm not sure how you would form a closed volume though.
If you were drawing an irregular 2D polydata that could be extruded
along the projection normal, then pass the polydata to vtkLinearExtrusionFilter.
Another solution is to draw the line segments of a closed polydata on a 
vtkImageCanvasSource2D, flood fill it, and use that as a mask.
There are many possibilities/solutions depending on what type of ROI you are
attempting to define.   Have a look at the example: VTK/Examples/GUI/Tcl/ImageTracerWidget.tcl

Dean
 




More information about the vtkusers mailing list