Hi,<div><br></div><div>I saw this question has been posted before on vtkusers however nobody replied. I&#39;d like</div><div>to try again :) It seems that the image tracer widget doesn&#39;t work in combination with the</div>
<div>image plane widget. </div><div><br></div><div>I start of by creating the plane widgets (one for each axis) in the constructor of my viewer class.</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>for( int i = 0; i &lt; 3; i++ )</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pPlaneWidget[i] = vtkImagePlaneWidget::New();</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pPlaneWidget[i]-&gt;SetInteractor( GetRenderWindow()-&gt;GetInteractor() );</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pPlaneWidget[i]-&gt;TextureInterpolateOn();</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pPlaneWidget[i]-&gt;SetResliceInterpolateToLinear();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pPlaneWidget[i]-&gt;Off();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div><br></div><div>Then I create the tracer widgets. As you can see I&#39;m also creating a dummy actor to satisfy the SetViewProp</div>
<div>method of the image tracer, however it has no effect whatsoever. The callback doesn&#39;t do anything at the moment.</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>for( int i = 0; i &lt; 3; i++ )</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>{</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pPlane[i] = vtkActor::New();</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i] = vtkImageTracerWidget::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerCallback[i] = vtkImageTracerWidgetCallback::New();</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerCallback[i]-&gt;SetWidget( m_pTracerWidget[i] );</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]-&gt;SetCaptureRadius( 3 );</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]-&gt;GetGlyphSource()-&gt;SetGlyphTypeToNone();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]-&gt;GetGlyphSource()-&gt;SetColor( 1, 0, 0 );</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]-&gt;GetGlyphSource()-&gt;SetScale(3 );</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]-&gt;GetGlyphSource()-&gt;SetRotationAngle( 45 );</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]-&gt;SetViewProp( m_pPlane[i] );</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]-&gt;SetInteractor( GetRenderWindow()-&gt;GetInteractor() );</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]-&gt;AddObserver( vtkCommand::EndInteractionEvent, m_pTracerCallback[i] );</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]-&gt;Off();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div><br></div><div>Once the vtkImageData (called &#39;pData&#39;) has been loaded, I update the plane and tracer widgets as follows. The</div>
<div>&#39;sliceNr[i]&#39; is the center slice for that particular plane.</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>for( int i = 0; i &lt; 3; i++ )</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>{</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pPlaneWidget[i]-&gt;SetInput( pData );</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pPlaneWidget[i]-&gt;SetPlaneOrientation( i );</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pPlaneWidget[i]-&gt;SetSliceIndex( sliceNr[i] );</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pPlaneWidget[i]-&gt;On();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pPlaneWidget[i]-&gt;InteractionOff();</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]-&gt;SetInput( pData );</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]-&gt;ProjectToPlaneOn();</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]-&gt;SetProjectionNormal( i );</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]-&gt;SetProjectionPosition( m_pPlaneWidget[i]-&gt;GetSlicePosition() );</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]-&gt;SnapToImageOn();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]-&gt;AutoCloseOn();</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]-&gt;PlaceWidget();</div><div>
<span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]-&gt;On();</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]-&gt;InteractionOn();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div>
<div><br></div><div>In principle, I would expect this to enable interaction of all 3 tracer widgets. However, all that happens when</div><div>I click either plane is that the whole collection of planes is rotating around.</div>
<div><br></div><div>Any ideas on what I&#39;m missing or doing wrong?</div><div><br></div><div>Thanks a lot,</div><div><br></div><div>Ralph</div><div><br></div></div></div>
</div>