[vtkusers] vtkGeometryFilter extracts multiple surfaces...

dce06003 dce06003 at fe.up.pt
Wed Sep 29 11:21:04 EDT 2010


Hello all.

I want to visualize a solid volume and so I built an unstrutured grid
composed by voxels (required because of the 3D reconstruction method
used). Then, to extract the outer surface, I used vtkGeometryFilter.
Then I triangulate and save into a STL file.

(...)
vtkGeometryFilter* geomFilter = vtkGeometryFilter::New();
geomFilter->SetInput(octreeUnsGrid);
geomFilter->SetMerging(1);
geomFilter->Update();

vtkTriangleFilter *triangles = vtkTriangleFilter::New();
triangles->SetInput(geomFilter->GetOutput());

vtkSTLWriter *stl = vtkSTLWriter::New();
stl->SetInputConnection(triangles->GetOutputPort());
stl->SetFileName("%surfaceTriangles.stl");
stl->Write();
(...)


The problem is that I get an inner surface of the original volume (see
images attached)... My someone tell me what could be the problem?

Thanks in advance,
Teresa Azevedo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: surface1.gif
Type: application/octet-stream
Size: 64083 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100929/83bbf5cd/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: surface_clipped.gif
Type: application/octet-stream
Size: 65350 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100929/83bbf5cd/attachment-0001.obj>


More information about the vtkusers mailing list