[Insight-users] vtkSeedRepresentation
Xiaopeng Yang
yxp233 at postech.ac.kr
Fri Jan 7 20:14:47 EST 2011
Dear Users,
I am trying to visualize a series of CT image by vtkImageViewer2. Also I am
using vtkSeedWidget for seed point selection. In the vtkSeedWidget,
vtkSeedRepresentation is used to place markers (cross hair) on selected seed
point. However, after I placed markers in one slice, those markers remained
on the screen when I navigate to other slices. What I want is that when I
navigate to other slices, those markers should disappear. That means those
markers just stay at that specific slice.
Could you please tell me how to make it?
Thank you.
Xiaopeng
PS.: Here is my code:
// Create the representation
vtkSmartPointer<vtkPointHandleRepresentation2D> handle =
vtkSmartPointer<vtkPointHandleRepresentation2D>::New();
handle->GetProperty()->SetColor(1,0,0);
vtkSmartPointer<vtkSeedRepresentation> rep =
vtkSmartPointer<vtkSeedRepresentation>::New();
rep->SetHandleRepresentation(handle);
// Seed widget
vtkSmartPointer<vtkSeedWidget> seedWidget =
vtkSmartPointer<vtkSeedWidget>::New();
seedWidget->SetInteractor(iren);
seedWidget->SetRepresentation(rep);
vtkSmartPointer<vtkSeedCallback> seedCallback =
vtkSmartPointer<vtkSeedCallback>::New();
seedCallback->SetRepresentation(rep);
seedWidget->AddObserver(vtkCommand::PlacePointEvent,seedCallback);
seedWidget->AddObserver(vtkCommand::InteractionEvent,seedCallback);
seedWidget->On();
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110108/ecf65872/attachment.htm>
More information about the Insight-users
mailing list