[vtkusers] Extract boundary from unstructured grid
Teresa Azevedo
dce06003 at fe.up.pt
Wed Oct 21 11:15:05 EDT 2009
Hi all.
I have a unstructured grid composed by voxels to visualize a volume
built in a octree structure (see image attached - it is a hand model,
cutted in the middle to visualize the size of the voxels, that are
bigger inside the hand, and go smaller has it approaches the surface).
I would like to do two things:
1 - extract the boundary faces
2 - soften the surface, using for example a marching cubes approach
(do I need to extract the boundary faces first?)
I already tried vtkContourGrid to generate a isosurface from the
unstructured grid, but with no success... here is a piece of the code:
(...)
vtkContourGrid* contourGrid = vtkContourGrid::New();
contourGrid->SetInput(octreeUnsGrid); //vtkUnstructuredGrid object
contourGrid->SetValue(0, 0.5); //not sure about these values
contourGrid->Update();
vtkPolyDataMapper *isoMapper = vtkPolyDataMapper::New();
isoMapper->SetInput(contourGrid->GetOutput());
isoMapper->ScalarVisibilityOn();
vtkActor *isoActor = vtkActor::New();
isoActor->SetMapper(isoMapper);
(...)
Can somebody help me, on which functions to use for both cases?
Thank you very much,
Teresa Azevedo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FIG16 - 3Dmodel_octree_l6_justSil_withoutVisMap_exactProj_snapshot9.gif
Type: image/gif
Size: 5762 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091021/b7722337/attachment.gif>
More information about the vtkusers
mailing list