using mesh file in matlab

326 views
Skip to first unread message

Ulrich Aretz

unread,
Jun 9, 2011, 4:39:31 AM6/9/11
to itksna...@googlegroups.com
Dear itkSnap users,

I want to use/read an exported mesh file (VTK PolyDataFile or STL
file) from itkSnap in MATLAB.
For that I have to know how the mesh is build and what each line
means? Where stands the first node/vertex and edge/face?

It would be great if anybody can help.
Thank you for your efforts.

Best regards
Uli

Paul Yushkevich

unread,
Jun 9, 2011, 3:42:41 PM6/9/11
to itksna...@googlegroups.com
I have scripts for reading the VTK data here:


--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To post to this group, send email to itksna...@googlegroups.com.
To unsubscribe from this group, send email to itksnap-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/itksnap-users?hl=en.




--
Paul A. Yushkevich, Ph.D.
Assistant Professor
Penn Image Computing and Science Laboratory
Department of Radiology
University of Pennsylvania

Ulrich Aretz

unread,
Jun 10, 2011, 2:50:24 AM6/10/11
to itksna...@googlegroups.com
Dear Paul,

thank you for your fast respond.
The function works and it seems to be the right method for me but I
have some questions about the arguments:

- What is the difference between p.points and p.point_data.data?
- The point coordinates stand in p.point, don't they? I call them nodes.
- Where are the edges (the lines between the nodes) and how are they organized?

Thanks for help.

Best regards
Uli

2011/6/9 Paul Yushkevich <pau...@mail.med.upenn.edu>:

Paul Yushkevich

unread,
Jun 10, 2011, 7:47:41 AM6/10/11
to itksna...@googlegroups.com
Uli

p.points are the node coordinates. p.point_data are all the attribute arrays that can be stored in a VTK mesh.

p.cells.polygons are the faces (triangles)

there is no explicit representation of the edges. However, MATLAB 2009+ has a nice TriRep class that can generate edge and other information from vertices and faces.

Paul.
Reply all
Reply to author
Forward
0 new messages