[Insight-users] Mesh Types: Error in visualizing

Luis Ibanez luis.ibanez at kitware.com
Sat Aug 28 19:10:34 EDT 2004



Hi Uday,

If you want to visualize the surface of the segmented region,
it is not a good idea to use the itkBinaryMask3DMeshSource.

Instead you should convert your ITK image resulting from the
segmentation into a VTK image and then apply the vtkContourFilter
on the resulting vtkImageData object. Then take the vtkPolyData
resulting from the Contour filter and connect it to a standard
VTK visualization pipeline.


For your convenience we just added an example illustrating
how to do this. You will find this new example in

   InsightApplications/Auxiliary/vtk
               itkReadITKImageSegmentShowVTK.cxx

Note that although the example is illustrated for a 2D image,
you can adapt it to 3D with minimal modifications.


    Regards,


       Luis



-------------------------
uday kurkure wrote:

> Continuing my previous mail, the specific error I am
> getting is-
> 
> Z:\ITK\Insight\Mesh\itkBinaryMask3DMeshSourceTest.cxx(334)
> : error C2664: 'MeshToUnstructuredGrid' : cannot
> convert parameter 1 from 'class
> itk::SmartPointer<class
> itk::BinaryMask3DMeshSource<class
> itk::Mesh<double,3,class itk::DefaultStaticMeshTrai
> ts<double,3,3,float,float,double> > > >' to 'class
> itk::Mesh<double,3,class
> itk::DefaultStaticMeshTraits<double,3,3,double,double,double>
> 
>>*'
> 
> 
> If anybody knows the solution or some other way to
> overcome it, I would appreciate it.
> 
> Thanks
> -Uday 
> 
> 
> 
> --- uday kurkure <udaykurkure at yahoo.com> wrote:
> 
> 
>>Hello all,
>>
>>I want to visualize the result of
>>itkBinaryMask3DMeshSourceTest.cxx. 
>>I am using vtk2itk.cxx. But the output mesh type is
>>not matching with the input mesh type for 
>>vtkUnstructuredGrid*
>>MeshToUnstructuredGrid(floatMesh*
>>mesh)
>>
>>What can I do to make it work?
>>
>>Thanks in advance,
>>Uday
>>
>>
>>		
>>__________________________________
>>Do you Yahoo!?
>>Yahoo! Mail is new and improved - Check it out!
>>http://promotions.yahoo.com/new_mail
>>_______________________________________________
>>Insight-users mailing list
>>Insight-users at itk.org
>>http://www.itk.org/mailman/listinfo/insight-users
>>
> 
> 
> 
> 
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail is new and improved - Check it out!
> http://promotions.yahoo.com/new_mail
> _______________________________________________
> 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