Skip to content, Skip to search

Changes

TrakEM2 Scripting

546 bytes added, 03:23, 6 April 2011
Generate a 3D mesh for an AreaList
TextWindow(materialFileName, materialData.toString(), 400, 400)
</source>
 
 
=== Generate 3D mesh for an AreaTree ===
 
Just like for an AreaList (see above), but extract the triangles with:
 
<source lang="python">
triangles = areatree.generateMesh(1, resample).verts
</source>
 
The AreaTree's generateMesh returns a [http://pacific.mpi-cbg.de/javadoc/ini/trakem2/display/Tree.MeshData.html MeshData] object with the list of vertices and the list of colors of each vertex. The <i>generateTriangles</i> method of an AreaTree returns a list of Point3f that are ready for creating a CustomLineMesh to represent the skeleton.
= Save the project while running a task =
Emailconfirmed, uploaders
653
edits