[vtkusers] How might I add user interactive drawing tools?

Dean Inglis dean.inglis at sympatico.ca
Fri Oct 3 09:43:53 EDT 2008


Hi Dave,

have a look at VTK/Examples/GUI/Tcl/ImageTracerWidget.tcl
and VTK/Widgets/Testing/Cxx/TestImageActorContourWidget.cxx
as well as the doxygen docs on classes (and those related to) 
vtkImageTracerWidget and vtkContourWidget.

HTH,
Dean



I'm porting some brain MRI visualisation software I've been  
developing, to use VTK for its rendering. It needs to support some  
advanced user input for defining regions-of-interest or manually  
creating "mask" images, etc. Users need to able to draw basic shapes  
and/or freehand regions on top of the 2D slices of the MRIs and  
statistical volumes being viewed. The kind of thing I'd like is for  
mouse interaction to leave a "track" (an extents box or line, etc.)  
during the editing phase then these ROIs might get used, e.g., to set  
voxels in a new volume layer cloned from one of the loaded MRI volumes.

In my original (Qt's graphics primitives) adhoc line drawing was  
pretty simple but I have never attempted this complex a user  
interaction using VTK and don't really know where to start. Does  
anyone have any experience or advice they'd be willing to share?  
Perhaps some examples they could point me at.

Sorry if this is already well covered. So far I haven't found anything  
VTK specific - please feel free to RTFM me if appropriate :-)

Cheers, Dave




More information about the vtkusers mailing list