Differences between revisions 1 and 11 (spanning 10 versions)
Revision 1 as of 2004-09-08 10:19:32
Size: 2516
Editor: DavidTuch
Comment: replaces mri%cor2label
Revision 11 as of 2017-12-08 12:02:26
Size: 3266
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
## page was renamed from mri_cor2label
Line 9: Line 10:
'''(formerly called mri_cor2label)'''
Line 10: Line 13:
[[TableOfContents]] <<TableOfContents>>
Line 14: Line 17:
mri_cor2label- Converts values in a COR volume to a label. mri_vol2label - converts values in a COR volume to a label. (formerly called mri_cor2label)
Line 17: Line 20:
mri_vol2label --c <cordir> --id <labelid> --l <labelfile>
Line 19: Line 24:
none
Line 20: Line 27:
|| --c  cordir || directory to find COR volume||
|| --id labelid || 0-255 value in COR volume||
|| --l labelfile || name of output file||
|| --c <cordir> || directory to find COR volume||
|| --id <labelid> || 0-255 value in COR volume||
|| --l <labelfile> || name of output file||
Line 25: Line 32:
|| --v volfile || write label volume in file|| || --v <volfile> || write label volume in file||
Line 28: Line 35:
|| --surf subject hemi <surf> || interpret input as a surface overlay ||
|| --sd subjectsdir || override $SUBJECTS_DIR ||
Line 29: Line 38:
= Outputs =
Line 31: Line 39:
Converts values in a COR volume to a label. The program searches the
COR volume in directory 'cordir' for values equal to 'labelid'. The
xyz values for each point are then computed assuming 1 mm^3 voxels and
that xyz=0 at the center of the volume. The xyz values are then stored
in 'labelfile' in the label file format; the vertex values are set to
zero as is the statistic value. While this program can be used with
any COR volume, it was designed to convert parcellation volumes, which
happen to be stored in COR format. See tkmedit for more information
on parcellations. The labelid must be within the range of 0 to 255.
The label volume in mm^3 can be written to the argument of --v.
mri_vol2label converts values in a COR volume to a label. The program searches the COR volume in directory 'cordir' for values equal to 'labelid'. The xyz values for each point are then computed assuming 1 mm^3 ^voxels and that xyz=0 at the center of the volume. The xyz values are then stored in 'labelfile' in the label file format; the vertex values are set to zero as is the statistic value. While this program can be used with any COR volume, it was designed to convert parcellation volumes, which happen to be stored in COR format. See tkmedit for more information on parcellations. The labelid must be within the range of 0 to 255. The label volume in mm^3 ^can be written to the argument of --v.

== Note ==

The name of this program is a bit misleading as it will operate on anything readble by mri_convert (eg, mgz, mgh, nifti, bhdr, analyze, etc).
Line 44: Line 46:
mri_cor2label --c /space/final/frontier/myparcellation
             
--id 57 --l /home/brainmapper/spattemp/57.label

This will load the COR volume found in the directory
/space/final/frontier/myparcellation and then search the volume for
values equaling 57. The results are stored in 57.label in the directory
/home/brainmapper/spattemp, which must exist prior to execution.
{{{
mri_vol2label --c /space/final/frontier/myparcellation --id 57 --l /home/brainmapper/spattemp/57.label
}}}
This will load the COR volume found in the directory /space/final/frontier/myparcellation and then search the volume for
values equaling 57. The results are stored in 57.label in the directory /home/brainmapper/spattemp, which must exist prior to execution.
Line 53: Line 53:
Create a label of the left hemi surface vertices whose thickness is greater than 2mm.

First, create a binarized map of the thickness:
{{{
mri_binarize --i $SUBJECTS_DIR/subject/surf/lh.thickness --min 2 --o lh.thickness.thresh.mgh

mri_cor2label --i lh.thickness.thresh.mgh --surf subject lh --id 1 --l ./lh.thickness.thresh.label
}}}
Line 54: Line 63:
  If the name of the label does not include a forward slash (ie, '/')
 
then the program will attempt to put the label files in
 
$SUBJECTS_DIR/subject/label. So, if you want the labels to go into
 
the current directory, make sure to put a './' in front of the label.
If the name of the label does not include a forward slash (ie, '/') then the program will attempt to put the label files in $SUBJECTS_DIR/subject/label. So, if you want the labels to go into the current directory, make sure to put a './' in front of the label.
Line 60: Line 66:
["tkmedit"], ["mri_label2label"] [[tkmedit]], [[mri_label2label]]
Line 65: Line 71:
= Methods Description =

= References =

(formerly called mri_cor2label)

Index

Name

mri_vol2label - converts values in a COR volume to a label. (formerly called mri_cor2label)

Synopsis

mri_vol2label --c <cordir> --id <labelid> --l <labelfile>

Arguments

Positional Arguments

none

Required Flagged Arguments

--c <cordir>

directory to find COR volume

--id <labelid>

0-255 value in COR volume

--l <labelfile>

name of output file

Optional Flagged Arguments

--v <volfile>

write label volume in file

--help

print out help information

--synth

synthesizes a label (ignores values in COR volume)

--surf subject hemi <surf>

interpret input as a surface overlay

--sd subjectsdir

override $SUBJECTS_DIR

Description

mri_vol2label converts values in a COR volume to a label. The program searches the COR volume in directory 'cordir' for values equal to 'labelid'. The xyz values for each point are then computed assuming 1 mm3 voxels and that xyz=0 at the center of the volume. The xyz values are then stored in 'labelfile' in the label file format; the vertex values are set to zero as is the statistic value. While this program can be used with any COR volume, it was designed to convert parcellation volumes, which happen to be stored in COR format. See tkmedit for more information on parcellations. The labelid must be within the range of 0 to 255. The label volume in mm3 can be written to the argument of --v.

Note

The name of this program is a bit misleading as it will operate on anything readble by mri_convert (eg, mgz, mgh, nifti, bhdr, analyze, etc).

Examples

Example 1

mri_vol2label --c /space/final/frontier/myparcellation --id 57 --l /home/brainmapper/spattemp/57.label

This will load the COR volume found in the directory /space/final/frontier/myparcellation and then search the volume for values equaling 57. The results are stored in 57.label in the directory /home/brainmapper/spattemp, which must exist prior to execution.

Example 2

Create a label of the left hemi surface vertices whose thickness is greater than 2mm.

First, create a binarized map of the thickness:

mri_binarize --i $SUBJECTS_DIR/subject/surf/lh.thickness --min 2 --o lh.thickness.thresh.mgh

mri_cor2label --i lh.thickness.thresh.mgh --surf subject lh  --id 1 --l ./lh.thickness.thresh.label

Bugs

If the name of the label does not include a forward slash (ie, '/') then the program will attempt to put the label files in $SUBJECTS_DIR/subject/label. So, if you want the labels to go into the current directory, make sure to put a './' in front of the label.

See Also

tkmedit, mri_label2label

Links

FreeSurfer, FsFast

Reporting Bugs

Report bugs to <analysis-bugs@nmr.mgh.harvard.edu>

Author/s

DougGreve

mri_vol2label (last edited 2017-12-08 12:02:26 by MorganFogarty)