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 <invol> --o <outvol>

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)

Set min threshold so that the top P percent of the voxels are captured in the output mask. The percent will be computed based on the number of voxels in the volume (if not input mask is specified) or within the input mask.

--rimin rmin

Compute minimum based on rmin*globalmean

--rmax rmax

Compute maximum based on rmax*globalmean

--fdr fdrthres

Compute min based on FDR assuming -log10(p) input. --fdr-pos, -fdr-neg, fdr-abs (use only pos, neg, or abs). Abs is the default.

Set min threshold to achieve a given FDR. By default, it uses the absolute value but this can be changed with --fdr-pos and --fdr-neg. If a mask is passed, it will compute the voxel-wise threshold only with in the places where mask > 0.5. The mask threshold will be ignored.

--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.

Example 2

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

description

Bugs

None

See Also

othercommand1, othercommand2

Links

FreeSurfer, FsFast

Reporting Bugs

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

Author/s