Differences between revisions 2 and 3
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:
mri_binarize - Binarize a volume (or volume-encoded surface file) mri_binarize

= Description =
Program to binarize a volume (or volume-encoded surface file). Can also
be used to merge with other binarizations. Binarization can be done
based on threshold or on matched values.
Line 22: Line 27:
||-flag3 arg3 ||brief description || Cannot be used with --match ||
Line 24: Line 28:
||--max || Maximum voxel threshold (default is infinity) || || ||--max || Maximum voxel threshold (default is infinity) || Cannot be used with --match ||
Line 60: Line 64:
= Description =
Program to binarize a volume (or volume-encoded surface file). Can also
be used to merge with other binarizations. Binarization can be done
based on threshold or on matched values.
Line 67: Line 66:
{{{
Line 68: Line 68:
}}}
Line 70: Line 70:

== Example 2 ==
command foo -i f -o out -f fvalue
Line 85: Line 82:
= Methods Description =
{{{
description
description
}}}
= References =
[[References/Lastname##|References/Lastname###]]

Index

Name

mri_binarize

Description

Program to binarize a volume (or volume-encoded surface file). Can also be used to merge with other binarizations. Binarization can be done based on threshold or on matched values.

Synopsis

mri_binarize --i aseg.mgz --o left_hippocampus.mgz --match 17

Arguments

Required Flagged Arguments

--i <invol>

input volume to be binarized

--o <outvol>

path to output volume

Optional Flagged Arguments

--min

Minimum voxel threshold (default is -infinity)

Cannot be used with --match

--max

Maximum voxel threshold (default is infinity)

Cannot be used with --match

--pct P

Set threshold to capture top P% (in mask or total volume)

--rimin rmin

Compute minimum based on rmin*globalmean

--rmax rmax

Compute maximum based on rmax*globalmean

--match matchval <matchval2 ...>

Use match instead of threshold

Any number of match values can be specified. Cannot be used with --min/--max.

--wm

Set match vals to 2, 41, 77, 251-255 (aseg for cerebral WM)

--ventricles

Set match vals those for aseg ventricles+choroid (not 4th)

--wm+vcsf

WM and ventricular CSF, including choroid (not 4th)

--subcort-gm

Subcortical gray matter

--count countfile

Save number of hits in ascii file

Four numbers are saved: the number of voxels that match(nhits), the volume of the voxels that match, the total number of voxels in the volume (nvoxtot), and the percent matching (100*nhits/nvoxtot).

--binval val

Set voxels within threshold to val (default is 1)

--binvalnot notval

Set voxels outside range to notval (default is 0)

Only applies when a merge volume is NOT specified.

--inv

set binval=0, binvalnot=1

detailed description (eg, help file information)

--frame frame#

Use 0-based frame of input (default is 0)

--frame-sum

Sum frames together before binarizing

--frame-and

Take intersection (AND) of frames

You do not need to specify a --min (the min will be set to nframes-0.5).

--merge mergevol

Merge with mergevolume

mergevol must be the same dimension as the input volume. Combining this with --binval allows you to construct crude segmentations.

--mask maskvol

Mask input with maskvol

--mask-thresh thresh

Set threshold for mask (default is 0.5)

--abs

Take abs of invol first (ie, make unsigned)

--bincol

Set binarized voxel value to its column number

--zero-edges

Set edge voxels to zero

--zero-slice-edges

Set edge slice voxels to zero

--dilate ndilate

Dilate binarization in 3D

--erode nerode

Erode binarization in 3D (after any dilation)

--erode2d nerode2d

Erode binarization in 2D (after any 3D erosion)

--checkopts

Don't run anything, just check options and exit

--help

Print out information on how to use this program

--version

Print out version and exit

--uchar

Save output file in 'uchar' format

Outputs

volume1

description

volume2

description

Examples

Example 1

mri_binarize --i yoursubjectname/mri/aseg.mgz --match 17 --o left_hip.nii

Creates a binary mask (.nii) of the left hippocampus from the subject aseg.mgz.

description

Bugs

None

See Also

othercommand1, othercommand2

Links

FreeSurfer, FsFast

Reporting Bugs

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

Author/s

mri_binarize (last edited 2017-11-27 13:29:25 by MorganFogarty)