[vtkusers] how to place vtkImageTracerWidget

Dean Inglis dean.inglis at camris.ca
Tue Aug 23 10:00:01 EDT 2011


Hi Thiha,

try doing

m_imageTracer->SetProjectionPosition(93.0);

Dean



Hello,

  Please kindly help me with vtkImageTracerWidget.
  How can I position the vtkImageTracerWidget so that its projection
position is always in front of background image. (current seeing slice of
volume image)
  Sometimes, it was drawn in front of background image and sometimes it was
drawn behind the current viewing image slice.

Thanks,
Thiha

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





More information about the vtkusers mailing list