[vtkusers] SurfaceReconstructionFilter Problem

Manuel Ricardo Galindo Moreno mrgalindo at puj.edu.co
Mon Dec 11 16:10:36 EST 2006


Hello all!

I have a problem using SurfaceReconstructionFilter, i am trying to reconstruct a spine point cloud see it here is the result:

http://paginas.puj.edu.co/mrgalindo/spine.JPG

I am not sure if the problem is the nature of the point cloud, because y have tried the same pice of code with other point clouds from the internet (hand,venus de milo) and it works just fine. Or the Surface reconstruction algortithm does not behave well with the geometries proper of the spine.

I would deeply appreciate any suggestions!

Here is my code:

void SurfRecons(vtkPolyData* P)
{
	vtkSurfaceReconstructionFilter* SF=vtkSurfaceReconstructionFilter::New();
	SF->SetInput(P);
	SF->SetNeighborhoodSize(35);
	SF->SetSampleSpacing(0.75); 
	
	vtkMarchingContourFilter* CF=vtkMarchingContourFilter::New();
	CF->SetInputConnection(SF->GetOutputPort());
	CF->UseScalarTreeOn();//consume mas memoria pero mejora el rendimiento
	CF->SetValue(0,0);

	vtkReverseSense* RS=vtkReverseSense::New();
	RS->SetInputConnection(CF->GetOutputPort());
	RS->ReverseCellsOn();
	RS->ReverseNormalsOn();

vtkGeometryFilter* geometryFilter=vtkGeometryFilter::New();
geometryFilter->SetInput(RS->GetOutput());
geometryFilter->MergingOn();
geometryFilter->Update();

	Display(geometryFilter->GetOutput());

}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/ms-tnef
Size: 3152 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20061211/3feb50d6/attachment.bin>


More information about the vtkusers mailing list