Differences between revisions 6 and 17 (spanning 11 versions)
Revision 6 as of 2011-03-07 17:32:46
Size: 7933
Editor: MartinReuter
Comment:
Revision 17 as of 2014-01-31 22:36:30
Size: 9978
Editor: MartinReuter
Comment:
Deletions are marked like this. Additions are marked like this.
Line 21: Line 21:
## = Important Note =
## This webpage describes the version of mri_robust_register that is distributed with FreeSurfer 5.0. We encourage the use of that version or possible newer versions, that can be downloaded [[http://reuter.mit.edu/index.php/software/robust/|here]].

= Please Cite This =

'''''Highly Accurate Inverse Consistent Registration: A Robust Approach,'''''<<BR>>
M. Reuter, H.D. Rosas, B. Fischl.<<BR>>
!NeuroImage 53(4), pp. 1181-1196, 2010.
  http://dx.doi.org/10.1016/j.neuroimage.2010.07.020 <<BR>>
  http://reuter.mit.edu/papers/reuter-robreg10.pdf


= Description =

This program symmetrically aligns two volumes. It uses a method based on robust statistics to detect outliers and removes them from the registration. This leads to highly accurate registrations even with local changes in the image (e.g. jaw movement, tumor growth, atrophy). The main purpose is to find the rigid registration (translation, rotation) of longitudinal data, but the method can be used to rigidly (6DOF) and affinely (12DOF) align different images. An additional optional intensity scale parameter can be used to adjust for global intensity differences. It can also work on 2D images.

'''If the registration fails''':
The registration can fail because of several reasons, most likely due to large intensity differences (different modalities) or non-linear differences in the image. You can try:
 * Switch on ''intensity scaling'' ( --iscale).
 * When specifying a manual saturation (--sat) too many voxels might be considered outlier early in the process.
 You can check this by outputing the weights (--weights ow.mgz) and by looking at them in:
 {{{
   freeview dst.mgz mov_to_dst.mgz -overlay ow.mgz:colormap=heat
 }}}
 If most of the brain is labeled outlier, try to set the saturation to a higher
 value (eg. --sat 12) or use --satit to automatically determine a good sat value.
 * When using automatic saturation estimation ( --satit) you can try specifying the sensitivity manually or twiddle around with --wlimit (expert option, which is around 0.16 by default). A lower wlimit should reduce the number of outlier voxels.

Line 26: Line 55:
|| - -mov <mov.mgz> || movable input (source) || source volume as mgz file to be registered ||
|| - -dst <dst.mgz> || destination input (target) || target volume as mgz file for the registration ||
|| - -lta <m2d.lta> || transform output || gives the xform as lta file (mov to dst) ||
|| - -satit || automatic saturation || determine outlier sensitivity from image (recommended for head/brain scans) ||
If a non-robust approach ( - -leastsquares ) is used, - -satit is not necessary.
The saturation can alternatively be manually specified by - -sat <float> (see below), which can be usefull when dealing with different input volumes (not head or full brain).
|| -- mov <mov.mgz> || input movable volume to be aligned to target ||
|| -- dst <dst.mgz> || input target volume ||
|| -- lta <reg.lta> || output registration (transform from mov to dst) ||

One of the following is '''required''' for robust registration:

|| -- sat <real> || set outlier sensitivity manually (e.g. - - sat 4.685 ). Higher values mean less sensitivity. ||
|| -- satit || auto-detect good sensitivity (recommended for head or full brain scans) ||
Line 34: Line 65:
|| - -sat <float> || saturation || manually set outlier sensitivity instead of - -satit (e.g. - - sat 4.685, higher values mean less sensitivity) ||
|| - -warp <outvol.mgz> || warped mov || apply final xform to source, write to outvol.mgz ||
|| - -weights <wvol.mgz> || final weights || output weights transformed to target space as wvol.mgz||
|| - -halfmov <hm.mgz> || half-way mov || outputs half-way mov (mapped to halfway space)||
|| - -halfdst <hd.mgz> || half-way dst || outputs half-way dst (mapped to halfway space)||
|| - -halfweights <hw.mgz> || half-way weights ||outputs half-way weights (mapped to halfway space) ||
|| - -halfmovlta <hm.lta> || half-way mov lta ||outputs transform from mov to half-way space ||
|| - -halfdstlta <hd.lta> || half-way dst lta || outputs transform from dst to half-way space||
|| - -iscale || intensity scaling || estimate intensity scale factor (default no I-scaling)||
|| - -iscaleout <iscale.txt> || iscale output || specify filename for final intensity scale (only with --iscale), default if not specified is: <m2d>-intensitiy.txt (where <m2d> is the - -lta registration name) ||
|| - -transonly || only translation || find 3 parameter translation only||
|| - -transform <x.lta> || initial xform || use initial transform lta on source ('id'=identity), default is to align center using moments||
|| - -initorient || initial orientation || use moments for orientation initialization (default false), (recommended for stripped brains, but has difficulties with full head images with different cropping)||
|| - -noinit || skip initialization || skip aligning centers (which is default) ||
|| - -vox2vox || output VOX2VOX || output VOX2VOX lta file (default is RAS2RAS)||
|| - -leastsquares || non-robust || use least squares instead of robust M-estimator (not recommended, for testing only) ||
|| - -maxit <#> || max iterations || iterate max # times on each resolution (default 5)||
|| - -highit <#> || max iterations || iterate max # times on highest resolution (default 5)||
|| - -epsit <float> || eps change ||stop iterations when change below <float> (default 0.01) ||
|| - -nomulti || no multiscale || work on highest resolution (no multiscale)||
|| - -wlimit <float> || outlier limit || set maximal center weighted outlier limit in satit (you need to know what you are doing)||
|| - -subsample <#> || subsample image || subsample if dim > # on all axes (default no subsampling)||
|| - -doubleprec || precision type || use double precision internally (high memory usage!!!), default is float||
|| - -maskmov <mask.mgz> || apply mask mov ||mask mov/src with mask.mgz ||
|| - -maskdst <mask.mgz> || apply mask dst || mask dst/target with mask.mgz ||
|| - -floattype || image type || convert input volumes to float for processing (default keep input type) ||
|| - -debug || print debug info ||show debug output (default no debug output) ||
|| - -verbose || talkativiy || 0 quiet, 1 normal (default), 2 detail ||

= Outputs =
See above

= Important Note =
This webpage describes the version of mri_robust_register that is distributed with FreeSurfer 5.0. We encourage the use of that version or possible newer versions, that can be downloaded [[http://reuter.mit.edu/index.php/software/robust/|here]].

= Description =

This program symmetrically aligns two volumes. It uses a method based on robust statistics to detect outliers and removes them from the registration. This leads to highly accurate registrations even with local changes in the image (e.g. jaw movement). The main purpose is to find the rigid registration (translation, rotation) of longitudinal data, but the method can be used to rigidly align different images. An additional optional intensity scale parameter can be used to adjust for global intensity differences. The extension to affine registration is being tested.

'''If the registration fails''':
The registration can fail because of several reasons, most likeley due to large intensity differences or non-linear differences in the image. You can try:
 * Switch on ''intensity scaling'' ( - -iscale).
 * When specifying a manual saturation (- -sat) too many voxels might be considered outlier early in the process.
 You can check this by outputing the weights (--weights ow.mgz) and by looking at them in:
 {{{
   tkmedit -f dst.mgz -aux mov.mgz -overlay ow.mgz
 }}}
 If most of the brain is labeled outlier, try to set the saturation to a higher
 value (eg. --sat 12) or use --satit to automatically determine a good sat value.
 * When using automatic saturation estimation ( - -satit) you can try specifying the sensitivity manually or twiddle around with - -wlimit (which is around 0.16 by default). A lower wlimit should reduce the number of outlier voxels.
|| -- mapmov <aligned.mgz> || output image: movable mapped and resampled at destination (cubic-bspline-interpolation)||
|| -- mapmovhdr <aligned.mgz> || output image: movable aligned to destination (no resampling, only adjusting header vox2ras) ||
|| -- weights <weights.mgz> || output weights (outliers) in destination space ||
|| -- iscale || estimate intensity scale factor (default no). Highly recommended for unnormalized images! ||
|| -- iscaleout <fname.txt> || output txt file for iscale value (will activate --iscale). Default: no iscale output ||
|| -- iscalein <fname.txt> || initial input txt file for iscale value (probably you want to also activate --iscale to estimate final value?) ||
|| -- transonly || find 3 parameter translation only ||
|| -- affine || find 12 parameter affine transform ||
|| -- ixform lta || use initial transform lta on source ('id'=identity), default is align center (using moments) ||
|| -- initorient || use moments for orientation init (default false). Recommended for stripped brains, but not with full head images with different cropping ||
|| -- noinit || skip transform init, default: translation of centers ||
|| -- vox2vox || output VOX2VOX lta file (default is RAS2RAS) ||
|| -- maxit <#> || iterate max # times on each resolution (default 5) ||
|| -- highit <#> || iterate max # times on highest resolution (default 5) ||
|| -- epsit <real> || stop iterations when all tp transform updates fall below <real> (default 0.01) ||
|| -- nomulti || work on highest resolution only (no multiscale) ||
|| -- wlimit <real> || sets maximal outlier limit for --satit (default 0.16), reduce to decrease outlier sensitivity ||
|| -- subsample <real> || subsample if dim > # on all axes (default no subs.) ||
|| -- floattype || convert images to float internally (default: keep input type) ||
|| -- doubleprec || double precision (instead of float) internally (large memory usage!!!) ||
|| -- maskmov <mask.mgz> || mask mov/src with mask.mgz ||
|| -- maskdst <mask.mgz> || mask dst/target with mask.mgz ||
|| -- halfmov <hm.mgz> || outputs half-way mov (mapped to halfway space) ||
|| -- halfdst <hd.mgz> || outputs half-way dst (mapped to halfway space) ||
|| -- halfweights hw.mgz || outputs half-way weights (mapped to halfway space) ||
|| -- halfmovlta hm.lta || outputs transform from mov to half-way space ||
|| -- halfdstlta hd.lta || outputs transform from dst to half-way space ||
|| -- debug || show debug output (default no debug output) ||
|| -- verbose || 0 quiet, 1 normal (default), 2 detail ||
Line 88: Line 98:
Simple Full Head Registration (same modality):
  
Line 89: Line 101:
mri_robust_register --mov vol1.mgz --dst vol2.mgz --lta v1to2.lta --warp v1to2.mgz --weights v1to2-weights.mgz --iscale mri_robust_register --mov vol1.mgz --dst vol2.mgz --lta v1to2.lta --mapmov v1to2.mgz --weights v1to2-weights.mgz --iscale --satit
Line 91: Line 103:

Computes the rigid registration (6 degrees of freedom) of vol1.mgz to vol2.mgz using robust statistics and with an additional 7th global intensity scaling parameter (recommended e.g. for orig.mgz). The output is the transform (v1to2.lta) and v1to2.mgz (the aligned vol1.mgz to the target image). Additionally the weights of the robust registation (outlier detection) are saved. Everything can be viewed in tkmedit with:
  Computes the symmetric rigid registration (translation and rotation) of vol1.mgz to vol2.mgz using robust statistics and with an additional global intensity scaling parameter. The output is the transform (v1to2.lta) and image v1to2.mgz (the vol1.mgz resampled to the target image). Additionally the weights of the robust registation (outlier detection) are saved. Everything can be viewed with:
 
Line 94: Line 107:
tkmedit -f vol2.mgz -aux v1to2.mgz -overlay v1to2-weights.mgz freeview vol2.mgz v1to2.mgz v1to2-weights.mgz:colormap=heat
Line 98: Line 111:
Half Way Space Output (same modality):
  
Line 99: Line 114:
mri_robust_register --mov vol1.mgz --dst vol2.mgz --lta v1to2.lta --halfmov h1.mgz --halfdst h2.mgz --halfmovlta h1.lta --halfdstlta h2.lta --iscale mri_robust_register --mov vol1.nii --dst vol2.nii --lta v1to2.lta --halfmov h1.nii --halfdst h2.nii --halfmovlta h1.lta --halfdstlta h2.lta --iscale --satit
}}}
  
Computes the rigid robust registration with intensity scaling of Nifti vol1 to vol2 (the registration will be saved in v1to2.lta). Additionally outputs the half-way volumes h1.nii and h2.nii (with corresponding transforms h1.lta and h2.lta). As both volumes are mapped to the half-way space, they will both be resampled. This can be used to construct an unbiased mean volume (e.g. with mri_average) or to compute change maps. The output can be viewed with:

{{{
freeview -v h1.nii h2.nii
Line 102: Line 123:
Computes the rigid robust registration with intensity scaling of vol1 to vol2 (the registration will be in v1to2.lta). Additionally outputs the half-way volumes h1 and h2 (with corresponding transforms h1.lta and h2.lta). As both volumes are mapped to the half-way space, they will both be resampled. This can be used to construct an unbiased mean volume (e.g. with [[mri_average]]) or to compute change maps. The output can be viewed with: == Example 3 ==
Part to Full Registration (same modality):
  
Line 104: Line 127:
tkmedit -f h1.mgz -aux h2.mgz mri_robust_register --mov fullhemi.mgz --dst part.mgz --noinit --nosym --sat 8 --maxsize 380 --mapmovhdr hemi2part.mgz --lta hemi2part.lta
}}}
  
Registers a full hemisphere with a high-resolutional part (e.g. hippocampal slices). It is recommended to specify the part as the target (the full hemi image will then be cropped internally). For partial registration to work we need to skip the center of mass initialization (--noinit) and switch off the half way space (--nosym). Also the inputs need to be in an approximate alignment, alternatively you can pass --ixform with a transform that approximately aligns the images. The satuarion needs to be specified manually with --sat. You can output the weights with --weights to see if too many voxels are removed and increase the value (to reduce outlier sensitivity). For high-res inputs we limit the resolution to 380 to reduce run time and mem usage. The output will be the transform (--lta) and the mov mapped to dst w/o resampling (--mapmovhdr), only adjusting the header information. Look at results with:
 
{{{
freeview -v part.mgz part2hemi.mgz
}}}
 
You can also invert transforms and apply them :
 
{{{
mri_concatenate_lta -invert1 hemi2part.lta identity.nofile part2hemi.lta
}}}
 
{{{
mri_convert -at inv1.lta part.mgz part2hemi.mgz
Line 118: Line 157:
 [[http://reuter.mit.edu/papers/reuter-robreg10.pdf|Highly Accurate Inverse Consistent Registration: A Robust Approach]], M. Reuter, H.D. Rosas, B. Fischl. NeuroImage 53 (4), pp. 1181-1196, 2010.
Please cite this:

'''''Highly Accurate Inverse Consistent Registration: A Robust Approach,'''''<<BR>>
M. Reuter, H.D. Rosas, B. Fischl.<<BR>>
!NeuroImage 53(4), pp. 1181-1196, 2010.
  http://dx.doi.org/10.1016/j.neuroimage.2010.07.020 <<BR>>
  http://reuter.mit.edu/papers/reuter-robreg10.pdf

Extension to multi registration (template estimation, [[mri_robust_template]] ):

'''''Avoiding Asymmetry-Induced Bias in Longitudinal Image Processing,'''''<<BR>>
M. Reuter, B. Fischl.<<BR>>
!NeuroImage 57(1), pp. 19-21, 2011.
   http://dx.doi.org/10.1016/j.neuroimage.2011.02.076 <<BR>>
   http://reuter.mit.edu/papers/reuter-bias11.pdf

'''''Within-Subject Template Estimation for Unbiased Longitudinal Image Analysis'''''<<BR>>
M. Reuter, N.J. Schmansky, H.D. Rosas, B. Fischl.<<BR>>
!NeuroImage
 61(4):1402-1418, 2012.
  http://dx.doi.org/10.1016/j.neuroimage.2012.02.084
  http://reuter.mit.edu/papers/reuter-long12.pdf

Also see [[FreeSurferMethodsCitation]].

Index

Name

mri_robust_register - computes symmetric robust registration of two volumes (within modality)

Synopsis

mri_robust_register --mov <mov.mgz> --dst <dst.mgz> --lta <m2d.lta> [options]

Please Cite This

Highly Accurate Inverse Consistent Registration: A Robust Approach,
M. Reuter, H.D. Rosas, B. Fischl.
NeuroImage 53(4), pp. 1181-1196, 2010.

Description

This program symmetrically aligns two volumes. It uses a method based on robust statistics to detect outliers and removes them from the registration. This leads to highly accurate registrations even with local changes in the image (e.g. jaw movement, tumor growth, atrophy). The main purpose is to find the rigid registration (translation, rotation) of longitudinal data, but the method can be used to rigidly (6DOF) and affinely (12DOF) align different images. An additional optional intensity scale parameter can be used to adjust for global intensity differences. It can also work on 2D images.

If the registration fails: The registration can fail because of several reasons, most likely due to large intensity differences (different modalities) or non-linear differences in the image. You can try:

  • Switch on intensity scaling ( --iscale).

  • When specifying a manual saturation (--sat) too many voxels might be considered outlier early in the process. You can check this by outputing the weights (--weights ow.mgz) and by looking at them in:
       freeview dst.mgz mov_to_dst.mgz -overlay ow.mgz:colormap=heat 
    If most of the brain is labeled outlier, try to set the saturation to a higher value (eg. --sat 12) or use --satit to automatically determine a good sat value.
  • When using automatic saturation estimation ( --satit) you can try specifying the sensitivity manually or twiddle around with --wlimit (expert option, which is around 0.16 by default). A lower wlimit should reduce the number of outlier voxels.

Arguments

Positional Arguments

No positional arguments

Required Flagged Arguments

-- mov <mov.mgz>

input movable volume to be aligned to target

-- dst <dst.mgz>

input target volume

-- lta <reg.lta>

output registration (transform from mov to dst)

One of the following is required for robust registration:

-- sat <real>

set outlier sensitivity manually (e.g. - - sat 4.685 ). Higher values mean less sensitivity.

-- satit

auto-detect good sensitivity (recommended for head or full brain scans)

Optional Flagged Arguments

-- mapmov <aligned.mgz>

output image: movable mapped and resampled at destination (cubic-bspline-interpolation)

-- mapmovhdr <aligned.mgz>

output image: movable aligned to destination (no resampling, only adjusting header vox2ras)

-- weights <weights.mgz>

output weights (outliers) in destination space

-- iscale

estimate intensity scale factor (default no). Highly recommended for unnormalized images!

-- iscaleout <fname.txt>

output txt file for iscale value (will activate --iscale). Default: no iscale output

-- iscalein <fname.txt>

initial input txt file for iscale value (probably you want to also activate --iscale to estimate final value?)

-- transonly

find 3 parameter translation only

-- affine

find 12 parameter affine transform

-- ixform lta

use initial transform lta on source ('id'=identity), default is align center (using moments)

-- initorient

use moments for orientation init (default false). Recommended for stripped brains, but not with full head images with different cropping

-- noinit

skip transform init, default: translation of centers

-- vox2vox

output VOX2VOX lta file (default is RAS2RAS)

-- maxit <#>

iterate max # times on each resolution (default 5)

-- highit <#>

iterate max # times on highest resolution (default 5)

-- epsit <real>

stop iterations when all tp transform updates fall below <real> (default 0.01)

-- nomulti

work on highest resolution only (no multiscale)

-- wlimit <real>

sets maximal outlier limit for --satit (default 0.16), reduce to decrease outlier sensitivity

-- subsample <real>

subsample if dim > # on all axes (default no subs.)

-- floattype

convert images to float internally (default: keep input type)

-- doubleprec

double precision (instead of float) internally (large memory usage!!!)

-- maskmov <mask.mgz>

mask mov/src with mask.mgz

-- maskdst <mask.mgz>

mask dst/target with mask.mgz

-- halfmov <hm.mgz>

outputs half-way mov (mapped to halfway space)

-- halfdst <hd.mgz>

outputs half-way dst (mapped to halfway space)

-- halfweights hw.mgz

outputs half-way weights (mapped to halfway space)

-- halfmovlta hm.lta

outputs transform from mov to half-way space

-- halfdstlta hd.lta

outputs transform from dst to half-way space

-- debug

show debug output (default no debug output)

-- verbose

0 quiet, 1 normal (default), 2 detail

Examples

Example 1

Simple Full Head Registration (same modality):

mri_robust_register --mov vol1.mgz --dst vol2.mgz --lta v1to2.lta --mapmov v1to2.mgz --weights v1to2-weights.mgz --iscale --satit

Computes the symmetric rigid registration (translation and rotation) of vol1.mgz to vol2.mgz using robust statistics and with an additional global intensity scaling parameter. The output is the transform (v1to2.lta) and image v1to2.mgz (the vol1.mgz resampled to the target image). Additionally the weights of the robust registation (outlier detection) are saved. Everything can be viewed with:

freeview vol2.mgz v1to2.mgz v1to2-weights.mgz:colormap=heat

Example 2

Half Way Space Output (same modality):

mri_robust_register --mov vol1.nii --dst vol2.nii --lta v1to2.lta --halfmov h1.nii --halfdst h2.nii --halfmovlta h1.lta --halfdstlta h2.lta --iscale --satit

Computes the rigid robust registration with intensity scaling of Nifti vol1 to vol2 (the registration will be saved in v1to2.lta). Additionally outputs the half-way volumes h1.nii and h2.nii (with corresponding transforms h1.lta and h2.lta). As both volumes are mapped to the half-way space, they will both be resampled. This can be used to construct an unbiased mean volume (e.g. with mri_average) or to compute change maps. The output can be viewed with:

freeview -v h1.nii h2.nii

Example 3

Part to Full Registration (same modality):

mri_robust_register --mov fullhemi.mgz --dst part.mgz --noinit --nosym --sat 8 --maxsize 380 --mapmovhdr hemi2part.mgz --lta hemi2part.lta

Registers a full hemisphere with a high-resolutional part (e.g. hippocampal slices). It is recommended to specify the part as the target (the full hemi image will then be cropped internally). For partial registration to work we need to skip the center of mass initialization (--noinit) and switch off the half way space (--nosym). Also the inputs need to be in an approximate alignment, alternatively you can pass --ixform with a transform that approximately aligns the images. The satuarion needs to be specified manually with --sat. You can output the weights with --weights to see if too many voxels are removed and increase the value (to reduce outlier sensitivity). For high-res inputs we limit the resolution to 380 to reduce run time and mem usage. The output will be the transform (--lta) and the mov mapped to dst w/o resampling (--mapmovhdr), only adjusting the header information. Look at results with:

freeview -v part.mgz part2hemi.mgz

You can also invert transforms and apply them :

mri_concatenate_lta -invert1 hemi2part.lta identity.nofile part2hemi.lta

mri_convert -at inv1.lta part.mgz part2hemi.mgz

Bugs

None (of course)

See Also

mri_robust_template

Links

LongitudinalProcessing

References

Please cite this:

Highly Accurate Inverse Consistent Registration: A Robust Approach,
M. Reuter, H.D. Rosas, B. Fischl.
NeuroImage 53(4), pp. 1181-1196, 2010.

Extension to multi registration (template estimation, mri_robust_template ):

Avoiding Asymmetry-Induced Bias in Longitudinal Image Processing,
M. Reuter, B. Fischl.
NeuroImage 57(1), pp. 19-21, 2011.

Within-Subject Template Estimation for Unbiased Longitudinal Image Analysis
M. Reuter, N.J. Schmansky, H.D. Rosas, B. Fischl.
NeuroImage

Also see FreeSurferMethodsCitation.

Reporting Bugs

Report bugs to <freesurfer@nmr.mgh.harvard.edu>

Author/s

MartinReuter

mri_robust_register (last edited 2014-01-31 22:36:30 by MartinReuter)