Index

Name

mri_diff - test for differences between two volumes

Synopsis

mri_diff [options] vol1file vol2file [options]

Arguments

Positional Arguments

vol1file, vol2file

volumes to be compared

Optional Flagged Arguments

--allow-res

do not check for resolution diffs

--allow-acq

do not check for acq param diffs

--allow-geo

do not check for geometry diffs

--allow-prec

do not check for precision diffs

--allow-pix

do not check for pixel diffs

--allow-ori

do not check for orientation diffs

--qa

check res, acq, precision, and orientation only

--thresh thresh

pix diffs must be greater than this

--log DiffFile

store diff info in this file

--debug

turn on debugging

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

Outputs

0

Volumes are not different and there were no errors

1

Errors encounted. Volumes may or may not be different

101

Volumes differ in dimension

102

Volumes differ in resolution

103

Volumes differ in acquisition parameters

104

Volumes differ in geometry

105

Volumes differ in precision

106

Volumes differ in pixel data

107

Volumes differ in orientation

Description

Determines whether two volumes differ. See below for what 'differ' means.

The basic usage is something like:

mri_diff vol1 vol2

It then prints to the terminal whether they differ or not.

NOTE: stuff might get printed to the terminal regardless of whether the volumes are different or not, so you cannot just use the presence or absence of terminal output to determine whether they are different as you can with unix diff.

There are three ways to determine whether they are different: 1. Look for 'volumes differ' in the terminal output 2. Program exits with status > 100 3. Create a log file

To create a log file, add --log yourlogfile any where in the command line, eg:

mri_diff vol1 vol2 --log yourlogfile

If youlogfile exists, it will be immediately deleted when the program starts. If a difference is detected, yourlogfile will be created, and information about the difference will be printed to it. If there is no difference, yourlogfile will not exist when the program finishes.

Volumes can differ in six ways:

  1. Dimension, return status = 101
  2. Resolutions, return status = 102
  3. Acquisition Parameters, return status = 103
  4. Geometry, return status = 104
  5. Precision, return status = 105
  6. Pixel Data, return status = 106

Dimension is number of rows, cols, slices, and frames. Resolution is voxel size. Acqusition parameters are: flip angle, TR, TE, and TI. Geometry checks the vox2ras matrices for equality. Precision is int, float, short, etc.

By default, all of these are checked, but some can be turned off with certain command-line flags:

--allow-res

turns of resolution checking

--allow-acq

turns of acquistion parameter checking

--allow-geo

turns of geometry checking

--allow-prec

turns of precision checking

--allow-pix

turns of pixel checking

In addition, the minimum difference in pixel value required to be considered different can be controlled with --thresh. Eg, if two volumes differ by .00001, and you do not consider this to be significant, then --thresh .00002 will prevent that difference from being considered different. The default threshold is 0.

mri_diff can be used to check that two volumes where acquired in the same way with the --qa flag. This turns on Res, Acq, and Prec, and turns of Geo and Pix. Instead of checking geometry, it checks for the basic orientation of the volumes (eg, RAS, LPI, etc). The idea here is that the pixel data and exact geometry may be different, but other things should be the same.

Bugs

None

See Also

Links

FreeSurfer, FsFast

Methods Description

description
description

References

Reporting Bugs

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

Author/s

DougGreve

mri_diff (last edited 2008-04-29 11:45:34 by localhost)