[vtkusers] Recreate a surface after stencil

samo sandra.moritz at gmx.de
Tue Jan 9 10:01:39 EST 2007


Hi all

I would like to recreate my surface after using vtkImageStencil. At the
moment, I get a surface with holes and no borders. How can I manage to get a
complete surface again with no holes ? vtkMarchingCubes only recreates the
surface with holes.

Thanks a lot. Appreciate any help!

Samo

vtkPolyDataToImageStencil* p2i = vtkPolyDataToImageStencil::New();
	vtkPolyData* polyData = (vtkPolyData*)(stlActor->GetMapper()->GetInput());
	vtkTransformPolyDataFilter* polyTrafo = vtkTransformPolyDataFilter::New();
	polyTrafo->SetInput(polyData);
	polyTrafo->SetTransform(m_ImplantTransform);
	p2i->SetInput(polyTrafo->GetOutput());
	vtkImageStencil* stencil = vtkImageStencil::New();
	stencil->SetInput(m_MetaVolumeReader->GetOutput());
	stencil->SetStencil(p2i->GetOutput());
	stencil->ReverseStencilOff();
	stencil->SetBackgroundValue(0.0);
	stencil->Update();
-- 
View this message in context: http://www.nabble.com/Recreate-a-surface-after-stencil-tf2946661.html#a8239549
Sent from the VTK - Users mailing list archive at Nabble.com.




More information about the vtkusers mailing list