Hi mitk's users,

Nearly two months have past since my last request for help. I know you are all busy, but here's an update anyway, in the hope that someone might have a few minutes to help me.

I had time in the last days to search further into my "Move some points" problem. Here's some details. I build the mesh of a heart and it works quite well.  To do so, I use three objects : vtkPolyData mitk::Mesh and mitk::Surface. My goal would be to let the user modify the mesh/surface by moving points with his mouse. Surprisingly, I can't find anything to do it in mitk. I thought it was a frequent job.  As for now, I found:
- nothing with vtkPolyData because there's probably no interactor for vtk stuff :)
- mitk::PointSet with a PointSetInteractor using type "onlymovepointsetinteractor" works perfectly, but ONLY with a mitk::PointSet. Even if mitk::Mesh is a subclass of mitk::PointSet, it doesn't work, probably because of the "dynamic_cast<mitk::PointSet*>(m_DataNode->GetData());" in PointSetInteractor::CanHandleEvent in mitkPointSetInteractor.cpp.
- mitk::Surface with a SurfaceInteractor using type "AffineInteractor3D" which would work like your Clipping Plane plugin. I would probably be able to modify my surface with it, but it only works in the 3D view and it's too coarse, I can't target a single point. So, it's probably not the good tool for us.

In the end, the only working solution I found is to use a mitk::PointSet, but I don't want to copy my points, let the user change some, click update and then let the user see the modification on the mesh. I want to let him move points (or cells) directly on the mesh/surface.

So, does anyone know how to move points/cells on a mesh/surface? Do I need to code my own interactor? Thanks for your time.

Le 2013-04-17 16:52, Nil Goyette a écrit :
The mesh and polydata work now. Here's an explanation for the next readers who might have the same problem. I thought that the parameter onlyTriangles of MeshUtil<MeshType>::MeshToPolyData would transform my polygon mesh into a triangle-only polydata, but it appears that it always returns an empty polydata. The polydata is not empty when onlyTriangles is set to false.

However, it's still not enough to use with vtkSmoothPolyDataFilter or vtkMassProperties because some (or all) cells are of type VTK_TRIANGLE_STRIPS and they need to be of type VTK_TRIANGLE. Using the vtkTriangleFilter class solves this problem.

However, it's still not enough to use with vtkMassProperties. The order in which the line are added in the mesh is important and since I don't really know the good order (is it explained somewhere?), I used the vtkPolyDataNormals class with AutoOrientNormals on.

So, this leaves the two same questions, as in the last message.
- I still have the "Move some points" problem, which you can read below in the older message.
Can I have a working example of a cast from polyData -> mitk::Mesh using MeshUtil<MeshType>::MeshFromPolyData?

Again, thanks for your time.
Logo Imeka Nil Goyette, M.Sc.
www.imeka.ca



------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to