Annotation Coordinates: Difference between revisions

From CCN Wiki
Jump to navigation Jump to search
(Created page with "When visualizing spatial relationships among network nodes representing regions in surface space, it is necessary to assign each node a position in 3D space. Try something li...")
 
No edit summary
Line 1: Line 1:
When visualizing spatial relationships among network nodes representing regions in surface space, it is necessary to assign each node a position in 3D space.
When visualizing spatial relationships among network nodes representing regions in surface space, it is necessary to assign each node a position in 3D space. The XYZ coordinates of each vertex associated with a label can be found in the corresponding ''.label'' files in the label/regenerated_?h_* directories that were generated when carrying out the Lausanne parcellation. For example, to calculate representative spatial locations for the labels in the 60 label parcellation, the associated label files are in ''label/regenerated_?h_60''.


Try something like:
 
  SUBJECT_ID=FS_T1_501
The .label files are plaintext, and are formatted as follows:
  mri_annotation2label --subject ${SUBJECT_ID} --hemi lh --outdir ./test_labels \
  #!ascii label  , from subject FS_T1_501 vox2ras=TkReg
  --table ../../surface_labels.txt \
1858
  --annotation myaparc_250
  50139  -32.785  -24.134  19.744 0.0000000000
50148  -32.758  -24.176  19.440 0.0000000000
50149  -33.035  -24.591  18.914 0.0000000000
50157 -33.293  -24.616  18.023 0.0000000000
51159  -32.615  -23.587  20.632 0.0000000000
  ... etc.
 
After the header row and the number of vertices in the file, the left-most column is the vertex number, and the three following columns are the x,y,z coordinates for that vertex. A reasonable value for the representative spatial location of that node can be obtained by calculating the mean x,y,z coordinate.

Revision as of 12:39, 19 May 2016

When visualizing spatial relationships among network nodes representing regions in surface space, it is necessary to assign each node a position in 3D space. The XYZ coordinates of each vertex associated with a label can be found in the corresponding .label files in the label/regenerated_?h_* directories that were generated when carrying out the Lausanne parcellation. For example, to calculate representative spatial locations for the labels in the 60 label parcellation, the associated label files are in label/regenerated_?h_60.


The .label files are plaintext, and are formatted as follows:

#!ascii label  , from subject FS_T1_501 vox2ras=TkReg
1858
50139  -32.785  -24.134  19.744 0.0000000000
50148  -32.758  -24.176  19.440 0.0000000000
50149  -33.035  -24.591  18.914 0.0000000000
50157  -33.293  -24.616  18.023 0.0000000000
51159  -32.615  -23.587  20.632 0.0000000000
... etc.

After the header row and the number of vertices in the file, the left-most column is the vertex number, and the three following columns are the x,y,z coordinates for that vertex. A reasonable value for the representative spatial location of that node can be obtained by calculating the mean x,y,z coordinate.