I have a vtkImageViewer2 and wish to use vtkContourWidget to draw a contour on the image. The data I'm loading is a 3D DICOM CT volume. I have found the following question <a href="http://vtk.1045678.n5.nabble.com/vtkContourWidget-with-vtkImageViewer2-td1236295.html">http://vtk.1045678.n5.nabble.com/vtkContourWidget-with-vtkImageViewer2-td1236295.html</a> and created the following code as a result (in Java)<div>
<br><div><div> vtkContourWidget contourWidget = new vtkContourWidget();</div><div> contourWidget.SetInteractor(panel.getRenWin().getIren());</div><div> contourWidget.FollowCursorOn();</div><div><br></div>
<div> vtkOrientedGlyphContourRepresentation rep = new vtkOrientedGlyphContourRepresentation();</div><div> contourWidget.SetRepresentation(rep);</div><div><br></div><div> vtkImageActorPointPlacer placer = new vtkImageActorPointPlacer();</div>
<div> placer.SetImageActor(panel.getImageViewer().GetImageActor());</div><div> rep.SetPointPlacer(placer);</div><div><br></div><div> contourWidget.EnabledOn();</div><div> contourWidget.ProcessEventsOn();</div>
</div></div><div><br></div><div>When I do this and draw a contour and then scroll through the image planes the same contour appears on every plane. Ideally I'd like a different contour on every plane. If I don't use the vtkImageActorPointPlacer then the contour only appears on one plane but it's the same plane regardless of which plane is being viewed, which is also wrong.</div>
<div><br></div><div>Any suggestions about how to do this correctly would be greatly appreciated.</div><div><br></div><div>Thanks</div>