Ok, this is possibly not a bug, maybe I just don't know how to use it. Sorry if it's the case.
I want to use some vtk tools on a mitk::Mesh, so I call MeshToPolyData on my mesh to get a vtkPolyData. This works (or at least compiles). When I try to cast it back to mitk::Mesh with MeshFromPolyData, it doesn't compile. I tried searching for examples in your code base, but you don't use this class and there's no test.
Here's the minimal code:
typedef mitk::PointSet::MeshType MeshType; vtkPolyData *polyData = MeshUtil<MeshType>::MeshToPolyData( m_Mesh->GetMesh()); // Do stuff with polydata MeshType::Pointer mesh = MeshUtil<MeshType>::MeshFromPolyData(polyData);
The error are on lines 804-805 in "mitkMeshUtil.h", something about
- Can't cast 'TriCellPointer' to 'itk::AutoPointer<TObjectType> &'
- Can't cast 'int' to 'mitk::PointSet::PointDataType'