[vtkusers] vtkContourWidget initial state of representation

Karthik Krishnan karthik.krishnan at kitware.com
Fri Jan 26 17:04:46 EST 2007


Hi Dean,

I agree. That's my mistake.  A possible solution would be to add the method

vtkContourWidget::IntializeFromUserSuppliedPolydata( vtkPolydata *pd)
{
  if (this->WidgetRep)
  {
     this->WidgetRep->BuildRepresentationFromUserSuppliedPolydata(pd);
     this->WidgetState = vtkContourWidget::Manipulate;
  }
}

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'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.

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)..

-karthik

On 1/26/07, Dean Inglis <dean.inglis at camris.ca> wrote:
>
> I am scratching my head over how
> to get this to work:
> vtkOrientedGlyphContourRepresentation has
> a public method to define itself from
> user supplied polydata.  The problem is
> that if you define a contour before interacting
> with the widget, it appears that you have
> to add a point or click one of the nodes
> to change the widget's initial internal
> state from Start to Manipulate.  Since
> the widget's ivar WidgetState is protected,
> and vtkContourRepresentation is not a friend
> class, there is no way (I think) to programatically
> force the widget into the desired Manipulate state.
> The use scenario here is that there is a popup
> display with an image and a contour defined by
> a previous segmentation step, and the user
> needs to edit this pre-existing contour.
> Anyone know a workaround?
>
> Dean
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070126/0f9aeda3/attachment.htm>


More information about the vtkusers mailing list