[Insight-users] How to convert a mesh from itkSphereMeshSource to VTK for viewing

uday kurkure udaykurkure at yahoo.com
Tue Aug 31 10:21:04 EDT 2004


Hi,

I am trying to view the output of itkSphereMeshSource
as used in DeformableModel2.cxx. But the input of
vtkUnstructuredGrid* MeshToUnstructuredGrid(MeshType*
mesh) does not match with the output of
itkSphereMeshSource.

The relevant code:

typedef double MeshPixelType;
typedef itk::Mesh< MeshPixelType > MeshType;
....
typedef itk::SphereMeshSource< MeshType >
MeshSourceType;
MeshSourceType::Pointer meshSource =
MeshSourceType::New();
....
vtkUnstructuredGrid* grid =
MeshToUnstructuredGrid(meshSource); //error in this
line

Compilation error:
Z:\ITK\Insight\Mesh2\mesh2grid\mesh2grid.cxx(349) :
error C2664: 'MeshToUnstructuredGrid' : cannot convert
parameter 1 from 'class itk::SmartPointer<class
itk::SphereMeshSource<class itk::Mesh<double,3,class
itk::DefaultStaticMeshTraits<double,3,3,f
loat,float,double> > > >' to 'class
itk::Mesh<double,3,class
itk::DefaultStaticMeshTraits<double,3,3,float,float,double>
> *'

How to resolve this error? 

Thanks,
Uday



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail


More information about the Insight-users mailing list