Differences between revisions 1 and 7 (spanning 6 versions)
Revision 1 as of 2007-01-31 15:39:42
Size: 3374
Editor: JedJeng
Comment:
Revision 7 as of 2017-10-03 14:00:46
Size: 4210
Comment:
Deletions are marked like this. Additions are marked like this.
Line 10: Line 10:
[[TableOfContents]] <<TableOfContents>>
Line 18: Line 18:
Also, run mri_label2vol --help for more information
Line 42: Line 43:
otherwise the value will the the label number. For a voxel to be otherwise the value will be the label number. For a voxel to be
Line 50: Line 51:
{{{
Line 53: Line 54:
  --temp f_000.bshort   --temp f.nii.gz
Line 56: Line 57:
  --o cent-lh_000.bshort   --o cent-lh.nii.gz
}}}
Line 59: Line 60:
{{{
Line 61: Line 62:
  -overlay ./cent-lh_000.bshort   -overlay ./cent-lh.nii.gz
Line 63: Line 64:
}}}
Line 69: Line 70:
{{{
Line 71: Line 73:
  --temp f_000.bshort   --temp f.nii.gz
Line 76: Line 78:
  --o cent-lh_000.bshort   --o cent-lh.nii.gz
}}}
Line 80: Line 82:
be filled at least 30% by the label: be filled at least 30% by the label.

== Example 3 ==
{{{
mri_label2vol
  --label lh-avg_central_sulcus.label
  --temp f.nii
  --reg register.dat
  --proj abs -3 -2 .1
  --subject bert --hemi lh
  --o cent-lh.nii
}}}
Convert a surface label into a binary mask in the functional space.
Sample a 1mm ribbon 2mm below the gray/white surface. Do not require a
fill threshold.

== Example 4 ==
{{{
mri_label2vol
  --label lh-avg_central_sulcus.label
  --label lh-avg_calcarine_sulcus.label
  --temp $SUBJECTS_DIR/bert/orig
  --identity
  --o cent_calc.img
}}}
Convert two labels into a volume in the same space as the labels. The voxels corresponding to lh-avg_central_sulcus.label will have a of
value of 1 whereas those assigned to lh-avg_calcarine_sulcus.label will have a value of 2.
Line 88: Line 117:
["mri_label2label"], ["mri_cor2label"], ["mri_annotation2label"], ["mri_mergelabels"], ["tkregister2"], ["mri_convert"], ["tkmedit"], ["tksurfer"] [[mri_label2label]], [[mri_vol2label]], [[mri_annotation2label]], [[mri_mergelabels]], [[tkregister2]], [[mri_convert]], [[tkmedit]], [[tksurfer]]
Line 100: Line 129:
["References/Lastname###"] [[References/Lastname###]]

Index

Name

mri_label2vol - creates mgz volume from a label or set of labels

Synopsis

mri_label2vol [--flag argument] Also, run mri_label2vol --help for more information

Arguments

Positional Arguments

none

Required Flagged Arguments

--label, --annot, or --seg are not to be used together.

--label labelfile

Label file

For multiple labels, use multiple --label flags.

--annot annotfile

Annotation file

--seg segpath

Path to segmentation

--temp tempvolid

Template volume

The output volume will have the same size and geometry as the template.

Optional Flagged Arguments

-flag3 arg3

brief description

detailed description (eg, help file information)

-flag4 arg4

brief description

detailed description (eg, help file information)

Outputs

--o volid

Single frame output volume (any mri_convert format accepted)

volume2

description

Description

Converts a label or a set of labels into a volume. For a single label, the volume will be binary: 1 where the label is and 0 where it is not. For multiple labels, the volume will be 0 where no labels were found otherwise the value will be the label number. For a voxel to be declared part of a label, it must have enough hits in the voxel and it must have more hits than any other label.

Examples

Example 1

Convert a label into a binary mask in the functional space; require that a functional voxel be filled at least 50% by the label:

mri_label2vol 
  --label lh-avg_central_sulcus.label 
  --temp f.nii.gz 
  --reg register.dat 
  --fillthresh .5 
  --o cent-lh.nii.gz

To see how well the label is mapped into the functional volume, run

tkmedit bert orig 
  -overlay ./cent-lh.nii.gz 
  -overlay-reg ./register.dat -fthresh .5 -fmid 1

Then load the label with File->Label->LoadLabel. The label should overlap with the overlay. The overlap will not be perfect but it should be very close.

Example 2

mri_label2vol 
  --label lh-avg_central_sulcus.label 
  --temp f.nii.gz 
  --reg register.dat 
  --fillthresh .3 
  --proj frac 0 1 .1 
  --subject bert --hemi lh
  --o cent-lh.nii.gz

Convert a surface label into a binary mask in the functional space. Fill in all the cortical gray matter. Require that a functional voxel be filled at least 30% by the label.

Example 3

mri_label2vol 
  --label lh-avg_central_sulcus.label 
  --temp f.nii 
  --reg register.dat 
  --proj abs -3 -2 .1 
  --subject bert --hemi lh
  --o cent-lh.nii

Convert a surface label into a binary mask in the functional space. Sample a 1mm ribbon 2mm below the gray/white surface. Do not require a fill threshold.

Example 4

mri_label2vol 
  --label lh-avg_central_sulcus.label 
  --label lh-avg_calcarine_sulcus.label 
  --temp $SUBJECTS_DIR/bert/orig
  --identity
  --o cent_calc.img

Convert two labels into a volume in the same space as the labels. The voxels corresponding to lh-avg_central_sulcus.label will have a of value of 1 whereas those assigned to lh-avg_calcarine_sulcus.label will have a value of 2.

Bugs

When the output type is COR, all the voxels will be zero. The work-around is to save it as some other type, then use mri_convert with -no_rescale 1 to convert it to COR.

Cannot convert surface labels with different hemispheres.

See Also

mri_label2label, mri_vol2label, mri_annotation2label, mri_mergelabels, tkregister2, mri_convert, tkmedit, tksurfer

Links

FreeSurfer, FsFast

Methods Description

description
description

References

References/Lastname###

Reporting Bugs

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

Author/s

JaneSmith

mri_label2vol (last edited 2017-11-30 11:34:02 by MorganFogarty)