Hi Nil,

The MeshUtil class isn't widely used in MITK, as you figured out. Generally, the mesh type must be a itk::Mesh.

You are using a typedef from mitk::PointSet, which probably doesn't fit your needs at all because the used pixel type is "PointDataType".

typedef itk::DefaultDynamicMeshTraits<
    PointDataType, PointDimension, MaxTopologicalDimension,
    CoordinateType, InterpolationWeightType, CellDataType > MeshTraits;
typedef itk::Mesh<PointDataType, PointDimension, MeshTraits> MeshType;

You should create your own itk base mesh type and use that one as the template argument. The one requirement for the pixel type I can see right away is that it needs to support construction out of integer values. You could try this:

typedef itk::Mesh<unsigned char> MeshType;
MeshType::Pointer itkMesh = mitk::MeshUtil<MeshType>::MeshFromPolyData(polyData);

I can only suggest to read up on the ITK documentation about the itk::Mesh template arguments.

Best,

Sascha


On 07/31/2013 06:01 PM, Nil Goyette wrote:
Somebody know how to use MeshUtil<MeshType>::MeshFromPolyData()? I probably use the wrong MeshType because I can't get it to compile, but I fail to see which type I could give him. My code is:
mitk::Mesh::MeshType::Pointer innerMesh =
    MeshUtil<mitk::Mesh::MeshType>::MeshFromPolyData(polyData);

I tried searching in mitk codebase to find how to use it but there's nothing. I filled a bug report http://bugs.mitk.org/show_bug.cgi?id=14956 4 months ago but I haven't heard about it. Someone can help? Thanks for your time.

--
Logo Imeka Nil Goyette, M.Sc.
www.imeka.ca


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to