[vtkusers] slicing a decimated mesh
John Harris
lost_bits1110 at hotmail.com
Fri Aug 12 12:20:23 EDT 2005
Hi there vtk experts,
So I have made a program which takes in an unstructured grid (mesh) as
input, and depending on the position and orientation of a motion tracker
that i've incorporated, slices my mesh and displays this on the window.
I've noticed that the resolution of my mesh significantly affects the speed
at which it slices the mesh. So instead of generating a coarser mesh, I have
tried decimating my original, fine mesh and then slicing this version to
display on the window. Below are the details of the various vtk filters I
use.
I want to be able to see a slice of my mesh thats "filled in", however I
only see these jagged-ish lines, an outline only I guess of what I've
sliced? I've even done MeshOutlineLODActor->GetProperty()->SetColor(0,0,0);
but it still doesnt look filled
Let me know if I shoudl be more clear, maybe I can provide a screenshot if
this doesnt make full sense,
any help is greatly appreciated!
Thanks!
JH
GeometryFilter1->SetInput( ourMeshExpert->Ugrid );
DecimatePro->SetInput( GeometryFilter1->GetOutput() );
DecimatePro->SetTargetReduction( 0.9 );
DecimatePro->PreserveTopologyOn();
PolyDataNormals_orig->SetInput( DecimatePro->GetOutput() );
PolyDataNormals_orig->ConsistencyOn();
PolyDataNormals_orig->AutoOrientNormalsOn();
Delaunay3D->SetInput( PolyDataNormals_orig->GetOutput() );
Delaunay3D->SetTolerance (0.01);
Delaunay3D->SetAlpha(0.0);
Delaunay3D->BoundingTriangulationOff();
Delaunay3D->Update();
Delaunay3D->Modified();
GeometryFilter2->SetInput( Delaunay3D->GetOutput() );
// slicing:
MeshSlicingPlane->SetOrigin( o[0], o[1], o[2] );
MeshSlicingPlane->SetNormal( v[0], v[1], v[2] );
Cutter->SetCutFunction( MeshSlicingPlane );
PolyDataMapper_ofMeshOutline->SetInput( Cutter->GetOutput() );
MeshOutlineLODActor->SetMapper( PolyDataMapper_ofMeshOutline );
More information about the vtkusers
mailing list