[Insight-users] Problem with itk::mesh to itkMeshTovtkPolyData

Juan Ramírez juanchoramirez at gmail.com
Wed Oct 26 17:32:25 EDT 2005


Hello Luis and Users,


I have a problem to visualize in vtk an segmentation, i work with the
example that appear in the user's guide exactly in the Surface
Extraction... when i try to pass how parameters of the mesh
(meshSource) in an  itkMeshTovtkPolyData; to visualize it in vtk,
appear the following error:


error C2664: 'SetInput' : cannot convert parameter 1
from 'class itk::Mesh<double,3,class
itk::DefaultStaticMeshTraits<double,3,3,float,float,double>> *'
to 'class    itk::SmartPointer<class itk::Mesh<double,3,class
itk::DefaultDynamicMeshTraits<double,3,3,double,double,double> > >'
        No constructor could take the source type, or constructor
overload resolution was ambiguous

Error executing cl.exe.

///////////////////
the code that i use:

//////////// declaration /////////////
typedef itk::BinaryMask3DMeshSource<ImageType,MeshType>MeshSourceType;
itkMeshTovtkPolyData *MallaConnector;


/////////// in the function //////////////
const PixelMesh objectValue =
static_cast<PixelMesh>(atof(this->m_editvalorobjeto) );
	this->meshSource->SetObjectValue( objectValue );
	try{
		this->meshSource->Update();
		Update=true;
	}
	catch( itk::ExceptionObject & exp )
	{
		MessageBox("Alerta",exp.what(),MB_OK);
		/*std::cerr << "Exception thrown during Update() " << std::endl;
		std::cerr << exp << std::endl;*/
	}
	this->MallaConnector->SetInput(meshSource->GetOutput());//here is the error
////////////////////////////////////

if you can suggest me something for to solve it,I thank.

--
Juan G. Ramírez
Estudiante Ingenieria de Sistemas UPTC.
Colombia.


More information about the Insight-users mailing list