Just an update so nobody answer parts of my questions for nothing. I found a vtk class called vtkMassProperties which can calculate the volume, but I can't get to use it.

I built a 1x1x1 cube mitk::Mesh just to test. I can see it on the screen, it seems perfect. I used MeshUtil<MeshType>::MeshToPolyData to cast my mitk::Mesh to a vtkPolyData and it runs without any error message. When I try to use vtkSmoothPolyDataFilter or vtkMassProperties though, it prints "No data to smooth!" and "No data to measure...!".

Moreover, I also have a problem to cast from vtkPolyData to mitk::Mesh. I opened a bug in this http://bugs.mitk.org/show_bug.cgi?id=14956 on this subject because I can't get any MeshType to work and there's no example anywhere.

So, here's a tl;dr :)
- 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 mitk::Mesh -> polyData -> mitk::Mesh?

Thanks for your time!

Le 2013-04-12 11:10, Nil Goyette a écrit :
Hi, I answered the first question myself. I thought that "m_Mesh->GetNewCellId();" was creating the cell, but it appears that we must also use a OpNEWCELL operation to actually create a cell. I now have a wireframe, as I wanted. My second question is still valid though.

Move some points

Looking at the code and documentation, I found MouseMovePointSetInteractor which probably do what I want to do. However, when I try to use it, it prints these errors:
8.00 core.ia.statemachineFac ERROR: Error in StateMachineFactory: StartState for pattern "MouseMovePointSetInteractor"not found! StateMachine might not work!
8.01 core.ia.statemachine FATAL: [type: MouseMovePointSetInteractor] Fatal Error in mitkStateMachine.cpp: Initialization of statemachine unsuccessfull! Initialize GlobalInteraction!
So I add mitk::GlobalInteraction::GetInstance()->Initialize("wathever"); and it prints "7.99 core.ia.globalinteraction WARNING: Global Interaction has already been initialized."
How am I supposed to use this interactor?

Calculate the volume
.
No news on that. I'm still unsure about what class to use. Can you please tell me what would be the mitk way to calculate the volume of a mesh?

Le 2013-04-09 18:10, Nil Goyette a écrit :
Hi, I've been playing with mitk::Mesh after collecting a set of points near the pericardium (still need to work on that!). You can see the results here : http://i.imgur.com/Wrusa3b.jpg. I think I got it right (setting points to positions, asking for a new cell, adding lines using positions, repeat.), but I'm not sure about some things :
  1. Is there a way to see the mesh in a practical manner? Like a "3d mesh" on google image. I tried changing the properties using the Property List, but only "visible" and "name" actually change something. A good visualization will help me ensure that the mesh is well built.
  2. It will be important for us to a) move some points using the viewer and b) calculate the volume of the heart. Will it be possible with mitk::Mesh? If not, can you please recommend other classes which would help us?

Thanks

--
Logo Imeka Nil Goyette, M.Sc.
www.imeka.ca
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to