Hi,<div><br></div><div>I saw this question has been posted before on vtkusers however nobody replied. I'd like</div><div>to try again :) It seems that the image tracer widget doesn'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 < 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]->SetInteractor( GetRenderWindow()->GetInteractor() );</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pPlaneWidget[i]->TextureInterpolateOn();</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pPlaneWidget[i]->SetResliceInterpolateToLinear();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pPlaneWidget[i]->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'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'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 < 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]->SetWidget( m_pTracerWidget[i] );</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]->SetCaptureRadius( 3 );</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]->GetGlyphSource()->SetGlyphTypeToNone();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]->GetGlyphSource()->SetColor( 1, 0, 0 );</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]->GetGlyphSource()->SetScale(3 );</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]->GetGlyphSource()->SetRotationAngle( 45 );</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]->SetViewProp( m_pPlane[i] );</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]->SetInteractor( GetRenderWindow()->GetInteractor() );</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]->AddObserver( vtkCommand::EndInteractionEvent, m_pTracerCallback[i] );</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]->Off();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>}</div><div><br></div><div>Once the vtkImageData (called 'pData') has been loaded, I update the plane and tracer widgets as follows. The</div>
<div>'sliceNr[i]' 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 < 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]->SetInput( pData );</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pPlaneWidget[i]->SetPlaneOrientation( i );</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pPlaneWidget[i]->SetSliceIndex( sliceNr[i] );</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pPlaneWidget[i]->On();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pPlaneWidget[i]->InteractionOff();</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]->SetInput( pData );</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]->ProjectToPlaneOn();</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]->SetProjectionNormal( i );</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]->SetProjectionPosition( m_pPlaneWidget[i]->GetSlicePosition() );</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]->SnapToImageOn();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]->AutoCloseOn();</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]->PlaceWidget();</div><div>
<span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]->On();</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>m_pTracerWidget[i]->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'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>