[vtkusers] vtkImageTracerWidget problem

Thiha Oo thihaucsm at gmail.com
Thu Aug 18 21:34:27 EDT 2011


Hi,
  I am getting some problem with vtkImageTracerWidget.
  I can show any slice from vtkImage volume and draw a freehand line with
vtkImageTracerWidget over background image in viewer Window. The image is on
XY plane.
  For some slices, the vtkImageTracerWidget draws in front of the background
image and it is visible. I checked the Z values of the points on tracer path
and they had the same value as my current viewing slice's Z value.
   However for some slices, the image tracer was drawn but it was behind the
background image and could not be seen. I checked the position values of the
points on tracer path and they were different from current viewing slice's Z
values. e.g., Current slice's Z value = 93 and the tracer's Z values =
92.99999 and therefore it was behind the slice image.

   How can I place the imageTracerWidget in front of the viewing slice all
the time? Here is a piece of codes that I used to initialize my
ImageTracerWidget.


    interactor = m_viewer2D->getRenderWindowInteractor();

    m_imageTracer->GetLineProperty()->SetLineWidth(3);
    m_imageTracer->SetInteractor(interactor);
    m_imageTracer->AutoCloseOn();
    m_imageTracer->SetCaptureRadius(10);
    m_imageTracer->SetViewProp( m_viewer2D->getImageActor() );
    m_imageTracer->On();


thanks and regards,
Thiha
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110819/eedf5fcb/attachment.htm>


More information about the vtkusers mailing list