[vtkusers] Re: [vtk-developers] vtkContourWidget -- how to display 'off-plane' contours?

Karthik Krishnan karthik.krishnan at kitware.com
Thu Feb 14 17:39:24 EST 2008


On 2/13/08, jonathan grimm <flymolo at gmail.com> wrote:
>
> Because the documentation is unclear:
>
> "Get the points in this contour as a vtkPolyData" made me believe you get
> just the clicked points and no connectivity.


It returns the polydata that is rendered on the viewport. I'll make the doc
more explicit.

So how do I get just the non interpolated points?


for (int i = 0; i  < contourRep->GetNumberOfNodes() ; i++)
  contourRep->GetNthNodeWorldPosition(i, p);

--
Kent:

As Bill mentioned, if you are really trying to model a 3D segmentation with
2D contours and then cut them along arbitrary planes and show them on
different render windows, its easier to have your datastructures represent a
3D object and then use VTK classes to do the work for you.

For instance, if you had a bunch of closed contours on the sagittal plane
representing a segmentation of the data, use vtkRuledSurfaceFilter and cap
it. You have a vtkPolyData representing your segmentation.

Then a vtkCutter should be able to show it as cuts along any plane.

--
karthik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080214/85b8711e/attachment.htm>


More information about the vtkusers mailing list