Hi Dean,<br><br>I agree. That&#39;s my mistake.&nbsp; A possible solution would be to add the method <br><br>vtkContourWidget::IntializeFromUserSuppliedPolydata( vtkPolydata *pd) <br>{<br>&nbsp; if (this-&gt;WidgetRep)<br>&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp; this-&gt;WidgetRep-&gt;BuildRepresentationFromUserSuppliedPolydata(pd);
<br>&nbsp;&nbsp;&nbsp;&nbsp; this-&gt;WidgetState = vtkContourWidget::Manipulate;<br> &nbsp; }<br>}<br><br>To correctly do this, IMHO would also mean supporting this method on all vtkContourRepresentations. The other one here is vtkFocalPlaneContourRepresentation. (intended for drawing contours on a 3D window). That&#39;s useful when you want to overlay a contour on a 3D window to do an like segmentation via an extrusion along the current viewing-axis. 
<br><br>I could add that when I get some time. It would require initializing the contour by projecting the user supplied polydata on the focal plane (vtkFocalPlanePointPlacer should help you do that)..<br><br>-karthik<br>
<br><div><span class="gmail_quote">On 1/26/07, <b class="gmail_sendername">Dean Inglis</b> &lt;<a href="mailto:dean.inglis@camris.ca">dean.inglis@camris.ca</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I am scratching my head over how<br>to get this to work:<br>vtkOrientedGlyphContourRepresentation has<br>a public method to define itself from<br>user supplied polydata.&nbsp;&nbsp;The problem is<br>that if you define a contour before interacting
<br>with the widget, it appears that you have<br>to add a point or click one of the nodes<br>to change the widget&#39;s initial internal<br>state from Start to Manipulate.&nbsp;&nbsp;Since<br>the widget&#39;s ivar WidgetState is protected,
<br>and vtkContourRepresentation is not a friend<br>class, there is no way (I think) to programatically<br>force the widget into the desired Manipulate state.<br>The use scenario here is that there is a popup<br>display with an image and a contour defined by
<br>a previous segmentation step, and the user<br>needs to edit this pre-existing contour.<br>Anyone know a workaround?<br><br>Dean<br>_______________________________________________<br>This is the private VTK discussion list.
<br>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">
http://www.vtk.org/mailman/listinfo/vtkusers</a><br></blockquote></div><br><br>