I am using vtk with QT. Currently I read a series of Dicom Images using vtkDicomImageReader
and visualize them with vtkImageViewer2
into slices.
Now I want to use mouse to pick some points and generate a closed curve on a 2D image slice, can anyone suggests what vtk method or class might be help?
I finally use vtkContourWidget
class for points selection.
This is a basic sample for using vtkContourWidget
and this is the documentation of this class.
In my work, vtkContourWidget
is binded with a vtkImageViewer2
using SetInteractor
method. After binding it, I could use mouse click to pick some points and generate a contour line.