[vtkusers] get vtkImage data from vtkPolyData

mcornetd at student.fsa.ucl.ac.be mcornetd at student.fsa.ucl.ac.be
Thu Sep 11 05:57:20 EDT 2003


Hello!

I discovering vtk and can't manage to get vtkImageData
from a vtkPolyData.  I apologize for asking stupid
questions.
Is there a methode you advise me to use?

I tried to go through a
vtkPolyDataToImageStencil and then an ImageStencil
but I get a black Image as output.

Thank you for having taken the time to read about my
problem.  I hope to get news from you soon.

Michel Cornet d'Elzius

==========================================
Here is my code:

vtkPolyData* P= fileToPolyData(path);
...
	//Change to ImageData
	vtkPolyDataToImageStencil*
fil1=vtkPolyDataToImageStencil::New();
	fil1->SetInput(P);
	fil1->Update();
	
	vtkImageStencil* fil2=vtkImageStencil::New();
	fil2->SetStencil(fil1->GetOutput(););
	fil2->Update();
	
	
	//Obtenir la carte de disparité
	vtkImageEuclideanDistance*
dist=vtkImageEuclideanDistance::New();
	dist->SetInput(fil2->GetOutput());
...
=============================================



More information about the vtkusers mailing list