[Insight-users] question about save itkMesh

Quan Xue qxue at jouy.inra.fr
Thu Aug 30 08:01:42 EDT 2007


Hello, ITK users:
        I meet with a question to save itkMesh object from 
Curves2DExtractor in InsightApplication into disk.
        From the mail list, I am trying to change teh itkMesh to 
vtkPolyData based on examples in vtk2itk.cxx, but I have the errors to 
tell me that the parameter should be converted.
        in vtk2itk the mesh type is defined as
typedef itk::Mesh< float, 3, itk::DefaultStaticMeshTraits<float, 3, 3, 
float, float> >floatMesh.
       but in ceExtractorConsoleBase.h
typedef itk::Point<float, 2> MeshPointDataType;
typedef itk::Mesh<MeshPointDataType, 3> MeshType
typedef itk::Mesh<MeshType::PointType, 2> ImageSpaceMeshType
      the error information is followed
error C2664: 'AddVisitor' : cannot convert parameter 1 from 'class 
itk::SmartPointer<class 
itk::CellInterfaceVisitorImplementation<double,class 
itk::CellTraitsInfo<2,float,float,u
nsigned long,unsigned long,unsigned long,class itk::Point<float,2>,class 
itk::VectorContainer<unsigned long,class itk::Point<float,2> >,class 
std::set<unsigned long,struct std::less<unsigned long>,class 
std::allocator<unsigned long> > >,class itk::T
riangleCell<class itk::CellInterface<class itk::Point<float,3>,class 
itk::CellTraitsInfo<2,float,float,unsigned long,unsigned long,unsigned 
long,class itk::Point<float,2>,class itk::VectorContainer<unsigned 
long,class itk::Point<float,2> >,class std
::set<unsigned long,struct std::less<unsigned long>,class 
std::allocator<unsigned long> > > > >,class itk::VistVTKCellsClass> >' 
to 'class itk::CellInterfaceVisitor<class itk::Point<float,3>,class 
itk::CellTraitsInfo<2,float,float,unsigned long,unsi
gned long,unsigned long,class itk::Point<float,2>,class 
itk::VectorContainer<unsigned long,class itk::Point<float,2> >,class 
std::set<unsigned long,struct std::less<unsigned long>,class 
std::allocator<unsigned long> > > > *'
        No user-defined-conversion operator available that can perform 
this conversion, or the operator cannot be called
error C2664: 'AddVisitor' : cannot convert parameter 1 from 'class 
itk::SmartPointer<class 
itk::CellInterfaceVisitorImplementation<double,class 
itk::CellTraitsInfo<2,float,float,u
nsigned long,unsigned long,unsigned long,class itk::Point<float,2>,class 
itk::VectorContainer<unsigned long,class itk::Point<float,2> >,class 
std::set<unsigned long,struct std::less<unsigned long>,class 
std::allocator<unsigned long> > >,class itk::Q
uadrilateralCell<class itk::CellInterface<class 
itk::Point<float,3>,class itk::CellTraitsInfo<2,float,float,unsigned 
long,unsigned long,unsigned long,class itk::Point<float,2>,class 
itk::VectorContainer<unsigned long,class itk::Point<float,2> >,clas
s std::set<unsigned long,struct std::less<unsigned long>,class 
std::allocator<unsigned long> > > > >,class itk::VistVTKCellsClass> >' 
to 'class itk::CellInterfaceVisitor<class itk::Point<float,3>,class 
itk::CellTraitsInfo<2,float,float,unsigned long
,unsigned long,unsigned long,class itk::Point<float,2>,class 
itk::VectorContainer<unsigned long,class itk::Point<float,2> >,class 
std::set<unsigned long,struct std::less<unsigned long>,class 
std::allocator<unsigned long> > > > *'
        No user-defined-conversion operator available that can perform 
this conversion, or the operator cannot be called
Error executing cl.exe.   



More information about the Insight-users mailing list