[Insight-users] question about save itkMesh
Luis Ibanez
luis.ibanez at kitware.com
Mon Sep 3 18:45:25 EDT 2007
Hi Quan,
You may want to use the class
Insight/Code/Review/
itkVTKPolyDataWriter.*
Note that you will have to insert a small
modification, since this class assumes that
the Mesh is a 3D mesh composed of triangular
faces.
In you case, however you have a polyline.
....
Note that the Curve2DExtractor *DOES NOT* form
lines. It only detects pixels that are good
candidate to be part of a line. I assume that
somehow you are venturing to connecting pixels
with their close neighbors in order to form lines.
Is that the case ?
Please let us know,
Thanks
Luis
--------------------
Quan Xue wrote:
> 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.
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list