[Insight-users] How to render ITK mesh in OpenGL-based environment?

Bill Hoffman bill . hoffman at kitware . com
Thu, 07 Aug 2003 12:59:48 -0400


You may want to look at this code:
InsightApplications/Auxiliary/vtk/vtk2itk.cxx

It displays a simple mesh in VTK.

-Bill

At 12:30 PM 8/7/2003, Bjorn Hanch Sollie wrote:
>Hi all,
>
>I'm using the BinaryMask3DMeshSource in ITK to create a mesh from a
>segmented image.  The code is basically like this:
>
>  typedef itk::Mesh<double> MeshType;
>  typedef itk::BinaryMask3DMeshSource<MeshType> MeshSourceType;
>
>  MeshSourceType::Pointer meshSource = MeshSourceType::New();
>  meshSource->SetObjectValue(objectValue);
>  meshSource->SetBinaryImage(segmentedImage);
>  meshSource->Update();
>  return meshSource->GetOutput();
>
>My problem is that I need to render/visualize this mesh in an
>OpenGL-based environment, and so my question is: How do I convert this
>ITK mesh into something that is suited to be rendered in such an
>environment?  How do I use the data output by this filter to construct
>a geometric object for this purpose?  I suppose some example code
>would be the best thing, but all comments and suggestions are welcome,
>of course!
>
>Thanks in advance,
>
>-Beorn
>-- 
>Truth is often just a widely held opinion.
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk . org
>http://www . itk . org/mailman/listinfo/insight-users