[vtkusers] Create 3-D surface from 2-D contours of slices
Karthik Krishnan
karthik.krishnan at kitware.com
Sun Oct 24 13:32:47 EDT 2010
On Sun, Oct 24, 2010 at 9:53 PM, shengweng <shengwen.guo at gmail.com> wrote:
>
> I have tried the method before, but I could only display the contours, and
> could not get surface.
> The following code you pointed out generated the PolyData explicitly, but
> the ContourWidget create the PolyData implicitly, I don't know how to check
> if the contours are stored in the PolyData correctly and there were points
> and lines, no vertex,cells in the PolyData.
> How to incorporate the 2-D contours including points and lines with
> z-depth(slice dimension) and then convert them into effective PolyData with
> x,y,z values?
>
As David already mentioned, get the polydata from each contour widget as :
rep = vtkContourRepresentation::SafeDownCast(widget->GetRepresentation())
vtkPolyData* polydata = rep->GetContourRepresentationAsPolyData();
Then use vtkAppendPolyData to append them. The pass it onto the
vtkVoxelContoursToSurfaceFilter, taking care to set the aspect (spacing) on
the filter appropriately based on the sampling of your image / size of the
contours.
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Create-3-D-surface-from-2-D-contours-of-slices-tp3234422p3234470.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK 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/20101024/8294e7f3/attachment.htm>
More information about the vtkusers
mailing list