You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Braden Yang requested a method to find representative vertices for a mesh. This centroid must be an existing vertex (for a watertight cigar shape, we want a vertex on the surface of the object, not inside). The latest release (v1.0.20201102). The new atlas2node() function supports this operation, creating a text file in BrainNet Viewer Node format which Surfice can open with the Nodes menu.
Details regarding the motivation, implementation and corner cases are described here (see PDF) by Daniel Glen (@afni-dglen), Meghan Robinson, and Chris Rorden (@neurolabusc).
For watertight meshes, the centroid vertex is the one closest to the center of gravity for all the nodes. Note for some objects like a sphere, the choice is arbitrary.
For non-watertight meshes, the vertex that is the furthest from any edge (in Euclidean space) is selected. In the case of ties, the vertex closest to the center of gravity for all vertices is selected. The analogy here is to consider the mesh like an island, where the beach represents the edge of the mesh. The representative vertex is the one furthest away (as the crow flies) from any beach.
Here is a simple script to illustrate how this finds nice centroids for the included boggle atlas:
import gl
import os
gl.resetdefaults()
gl.meshload('lh.pial')
gl.overlayload('boggle.lh.annot')
fnm = os.path.expanduser("~")+os.path.sep+'myBoggle.node';
if os.path.exists(fnm):
os.remove(fnm)
gl.atlas2node(fnm)
Here is a simple script to illustrate how this finds nice a reasonable centroids for the challenging dumbbell shape of the precuneus. It should be noted that Surfice will append nodes to existing files (allowing a script to iteratively combine lots of different regions). Therefore, in some cases it is worth deleting an existing file to restart acquiring nodes. In addition, note that by default Surfice will load BOTH the left and right hemisphere for mesh pairs with LH. and RH. filenames. Be aware that some tools (AFNI, FreeSurfer) will change the coordinates of a hemisphere as they are inflated (to the point where a spherical left hemisphere and right hemisphere have the same center origin: 0,0,0). The Surfice function meshloadbilateral can be used to enable and disable the loading of bilateral hemispheres. It might be worth disabling this feature when using the atlas2node() function.
import gl
import os
gl.resetdefaults()
#show only left hemisphere
gl.meshhemisphere(-1)
gl.meshload('lh.inflated.DK.precuneus.mz3')
fnm = os.path.expanduser("~")+os.path.sep+'myPrecuneus.node';
if os.path.exists(fnm):
os.remove(fnm)
gl.atlas2node(fnm)
The text was updated successfully, but these errors were encountered:
Braden Yang requested a method to find representative vertices for a mesh. This centroid must be an existing vertex (for a watertight cigar shape, we want a vertex on the surface of the object, not inside). The latest release (v1.0.20201102). The new atlas2node() function supports this operation, creating a text file in BrainNet Viewer Node format which Surfice can open with the Nodes menu.
Details regarding the motivation, implementation and corner cases are described here (see PDF) by Daniel Glen (@afni-dglen), Meghan Robinson, and Chris Rorden (@neurolabusc).
Here is a simple script to illustrate how this finds nice centroids for the included boggle atlas:
Here is a simple script to illustrate how this finds nice a reasonable centroids for the challenging dumbbell shape of the precuneus. It should be noted that Surfice will append nodes to existing files (allowing a script to iteratively combine lots of different regions). Therefore, in some cases it is worth deleting an existing file to restart acquiring nodes. In addition, note that by default Surfice will load BOTH the left and right hemisphere for mesh pairs with
LH.
andRH.
filenames. Be aware that some tools (AFNI, FreeSurfer) will change the coordinates of a hemisphere as they are inflated (to the point where a spherical left hemisphere and right hemisphere have the same center origin: 0,0,0). The Surfice functionmeshloadbilateral
can be used to enable and disable the loading of bilateral hemispheres. It might be worth disabling this feature when using the atlas2node() function.The text was updated successfully, but these errors were encountered: