<div dir="ltr">It seems to be a depth problem.vtkImageViewer2 displays all the actors whicher is above the image.To check ,comment the setupInteractor and see it in 3D.<br><br>I would suggest you to hide the actors which ever is out of current slice.<br>
<br>Jothy<br><br><div class="gmail_quote">On Tue, Apr 13, 2010 at 2:49 PM, Nicolas Rannou <span dir="ltr"><<a href="mailto:nicolas_rannou@hms.harvard.edu">nicolas_rannou@hms.harvard.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<br>
<br>
I'm experimenting some troubles using vtkSeedWidget.<br>
<br>
I visualize a volume (*.mhd) in a vtkImageViewer2.<br>
Then I use vtkSeedWidget to select some points through the volume.<br>
<br>
The problem is that when I select one point in one slice, then move to another slice to select another point, I can see the actor of the first selected point even if I am not on the same slice anymore.<br>
If I move further, the first point will not be visible after some more slices...<br>
The coordinates (real world coordinates) of all the created points are good.<br>
<br>
The problem must be in the visualization/actors somewhere...<br>
<br>
I tried to use vtkConstrainedPointHandleRepresentation and vtkImageActorPointPlacer without success.<br>
<br>
Did somebody already face this issue or have any advice?<br>
<br>
<br>
Thanks for your help,<br>
<br>
<br>
Nicolas<br>
<br>
//----------------------------------------------------------------------------------------------------------//<br>
// Sample of code using vtkConstrainedPointHandleRepresentation //<br>
//----------------------------------------------------------------------------------------------------------//<br>
<br>
// Create rendering window and everything...<br>
vtkRenderer *ren1 = vtkRenderer::New();<br>
vtkRenderWindow *renWin = vtkRenderWindow::New();<br>
renWin->AddRenderer(ren1);<br>
<br>
vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<br>
iren->SetRenderWindow(renWin);<br>
<br>
// Handler<br>
vtkConstrainedPointHandleRepresentation *handle<br>
= vtkConstrainedPointHandleRepresentation::New();<br>
handle->GetProperty()->SetColor(1,0,0);<br>
<br>
// Seed representation<br>
vtkSeedRepresentation *rep = vtkSeedRepresentation::New();<br>
rep->SetHandleRepresentation(handle);<br>
<br>
// Seed widget<br>
vtkSeedWidget *widget = vtkSeedWidget::New();<br>
widget->SetInteractor(iren);<br>
widget->SetRepresentation(rep);<br>
widget->On();<br>
<br>
// Image viewer to deisplay the volume<br>
// reader is a vtkMetaImageReader<br>
vtkImageViewer2* viewer = vtkImageViewer2::New();<br>
<br>
viewer->SetInput( reader->GetOutput() );<br>
viewer->SetRenderWindow( renWin );<br>
viewer->SetRenderer( ren1 );<br>
<br>
iren->Initialize();<br>
viewer->Render();<br>
iren->Start();<br>
<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br></div>