Deletions are marked like this. | Additions are marked like this. |
Line 18: | Line 18: |
mri_robust_template --mov <tp1.mgz> <tp2.mgz> ... --template <template.mgz> [options] | mri_robust_template --mov <tp1.mgz> <tp2.mgz> ... --template <template.mgz> --satit [options] |
Line 20: | Line 20: |
= Description = This program constructs an unbiased robust template for longitudinal volumes (within modality, 6-7 DOF). It uses an iterative method to construct a mean/median volume and the robust rigid registration of all input images to the current mean/median. It is used for the MotionCorrection step in recon-all and for creating a within-subject template in the longitudinal stream (-base) in FreeSurfer. Important Note: For best performance the input images should all have the same intensity level! Good images are, for example, the T1.mgz and norm.mgz from the FreeSurfer stream. |
|
Line 26: | Line 38: |
|| - - mov <tp1.mgz> <tp2.mgz> ... || input volumes || movable volumes to be aligned to common mean/median template || || - - template <template.mgz> || output template volume || mean/median image || |
|| - - mov <tp1.mgz> <tp2.mgz> ... || input movable volumes to be aligned to common mean/median template || || - - template <template.mgz> || output template volume (final mean/median image) || One of the following is required for sensitivity: || - - 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 30: | Line 47: |
|| - - lta <tp1.lta> <tp2.lta> ... || ||output xforms to template (for each input) || || - - warp <warp1.mgz> ... || || map each input to template|| || - - weights <weights1.mgz> ... || || output weights in target space || || - - average # || ||construct template from: 0 Mean, 1 Median (default) || || - - iscale || || allow also intensity scaling on high-res. (default no)|| || - - ixforms <t1.lta> <t2.lta> ... || ||use initial transforms (lta) on source ('id'=identity) || || - - vox2vox || ||output VOX2VOX lta file (default is RAS2RAS) || || - - leastsquares || || use least squares instead of robust M-estimator|| || - - sat <float> || ||set saturation for robust estimator (default 4.685) || || - - uchar || ||set input type to UCHAR (with intensity scaling) || || - - conform || ||conform volumes to 1mm vox (256^3) || || - - debug || ||show debug output (default no debug output) || |
|| - - lta <tp1.lta> <tp2.lta> ... || output xforms to template (for each input) || || - - mapmov <aligned1.mgz> ... || output images: map and resample each input to template || || - - weights <weights1.mgz> ... || output weights (outliers) in target space || || - - average <#> || construct template from: 0 Mean, 1 Median (default) || || - - inittp <#> || use TP# for spacial init (default random), 0: no init || || - - fixtp || map everthing to init TP# (init TP is not resampled) || || - - iscale || allow also intensity scaling (default off) || || - - iscalein <is1.txt> <is2.txt> ... || use initial intensity scales || || - - iscaleout <is1.txt> <is2.txt> ... || output final intensity scales (will activate --iscale) || || - - ixforms <t1.lta> <t2.lta> ... || use initial transforms (lta) on source ('id'=identity) || || - - vox2vox || output VOX2VOX lta file (default is RAS2RAS) || || - - leastsquares || use least squares instead of robust M-estimator (for testing only) || || - - noit || do not iterate, just create first template || || - - maxit <#> || iterate max # times (if #tp>2 default 6, else 5 for 2tp reg.) || || - - highit <#> || iterate max # times on highest resolution (default 5) || || - - epsit <real> || stop iterations when all tp transform updates fall below <real> (if #tp>2 default 0.03, else 0.01 for 2tp reg.) || || - - subsample <#> || subsample if dim > # on all axes (default no subs.) || || - - floattype || convert images to float internally (default: keep input type) || || - - finalnearest || use nearest neighbor in final interpolation when creating average. This is useful, e.g., when -noit and --ixforms are specified and brainmasks are mapped. || || - - doubleprec || double precision (instead of float) internally (large memory usage!!!) || || - - debug || show debug output (default no debug output) || |
Line 46: | Line 72: |
= Description = Uses an iterative method to construct a mean/median volume and the robust rigid registration of all input images to the current mean/median. '''Important Note:''' The input images should all have the same intensity level! Good images are, for example, the ''T1.mgz'' and ''norm.mgz'' from the FreeSurfer stream. |
|
Line 56: | Line 75: |
mri_robust_template --mov tp1.mgz tp2.mgz tp3.mgz --template mean.mgz --lta tp1.lta tp2.lta tp3.lta --warp tp1tomean.mgz tp2tomean.mgz tp3tomean.mgz --average 0 --iscale | mri_robust_template --mov tp1.mgz tp2.mgz tp3.mgz --template mean.mgz --lta tp1.lta tp2.lta tp3.lta --mapmov tp1tomean.mgz tp2tomean.mgz tp3tomean.mgz --average 0 --iscale --satit |
Line 59: | Line 78: |
Constructs a mean template from tp1,tp2 and tp3 and outputs the mean.mgz, the corresponding transforms (tp?.lta) and aligned images (tp?tomean.mgz). Intensity scaling is allowed (on highest resolution, once the images are well aligned). |
Constructs a mean (--average 0) template from tp1,tp2 and tp3 and outputs the mean.mgz, the corresponding transforms (tp?.lta) and aligned images (tp?tomean.mgz). Intensity scaling is allowed, the saturation/sensitivity for outliers is automatically computed (only possible for full head or full brain images). |
Line 66: | Line 86: |
== Example 2 == {{{ mri_robust_template --mov 001.mgz 002.mgz --average 1 --template rawavg.mgz --satit --inittp 1 --fixtp --noit --iscale --subsample 200 }}} Is used in the recon-all stream for motion correction of several (here two: 001.mgz and 002.mgz) inputs. In this case all follow-ups are registered to the first input (as specified with --inittp 1 --fixtp --noit) and the rawavg.mgz is output as the median image (--average 1). |
|
Line 76: | Line 103: |
= Methods Description = {{{ description description }}} |
|
Line 87: | Line 108: |
Report bugs to <analysis-bugs@nmr.mgh.harvard.edu> | Report bugs to <freesurfer@nmr.mgh.harvard.edu> |
Index
Contents
Name
mri_robust_template - construct an unbiased robust template for longitudinal volumes
Synopsis
mri_robust_template --mov <tp1.mgz> <tp2.mgz> ... --template <template.mgz> --satit [options]
Description
This program constructs an unbiased robust template for longitudinal volumes (within modality, 6-7 DOF). It uses an iterative method to construct a mean/median volume and the robust rigid registration of all input images to the current mean/median.
It is used for the MotionCorrection step in recon-all and for creating a within-subject template in the longitudinal stream (-base) in FreeSurfer.
Important Note: For best performance the input images should all have the same intensity level! Good images are, for example, the T1.mgz and norm.mgz from the FreeSurfer stream.
Arguments
Positional Arguments
None
Required Flagged Arguments
- - mov <tp1.mgz> <tp2.mgz> ... |
input movable volumes to be aligned to common mean/median template |
- - template <template.mgz> |
output template volume (final mean/median image) |
- One of the following is required for sensitivity:
- - 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
- - lta <tp1.lta> <tp2.lta> ... |
output xforms to template (for each input) |
- - mapmov <aligned1.mgz> ... |
output images: map and resample each input to template |
- - weights <weights1.mgz> ... |
output weights (outliers) in target space |
- - average <#> |
construct template from: 0 Mean, 1 Median (default) |
- - inittp <#> |
use TP# for spacial init (default random), 0: no init |
- - fixtp |
map everthing to init TP# (init TP is not resampled) |
- - iscale |
allow also intensity scaling (default off) |
- - iscalein <is1.txt> <is2.txt> ... |
use initial intensity scales |
- - iscaleout <is1.txt> <is2.txt> ... |
output final intensity scales (will activate --iscale) |
- - ixforms <t1.lta> <t2.lta> ... |
use initial transforms (lta) on source ('id'=identity) |
- - vox2vox |
output VOX2VOX lta file (default is RAS2RAS) |
- - leastsquares |
use least squares instead of robust M-estimator (for testing only) |
- - noit |
do not iterate, just create first template |
- - maxit <#> |
iterate max # times (if #tp>2 default 6, else 5 for 2tp reg.) |
- - highit <#> |
iterate max # times on highest resolution (default 5) |
- - epsit <real> |
stop iterations when all tp transform updates fall below <real> (if #tp>2 default 0.03, else 0.01 for 2tp reg.) |
- - subsample <#> |
subsample if dim > # on all axes (default no subs.) |
- - floattype |
convert images to float internally (default: keep input type) |
- - finalnearest |
use nearest neighbor in final interpolation when creating average. This is useful, e.g., when -noit and --ixforms are specified and brainmasks are mapped. |
- - doubleprec |
double precision (instead of float) internally (large memory usage!!!) |
- - debug |
show debug output (default no debug output) |
Outputs
See above
Examples
Example 1
mri_robust_template --mov tp1.mgz tp2.mgz tp3.mgz --template mean.mgz --lta tp1.lta tp2.lta tp3.lta --mapmov tp1tomean.mgz tp2tomean.mgz tp3tomean.mgz --average 0 --iscale --satit
Constructs a mean (--average 0) template from tp1,tp2 and tp3 and outputs the mean.mgz, the corresponding transforms (tp?.lta) and aligned images (tp?tomean.mgz). Intensity scaling is allowed, the saturation/sensitivity for outliers is automatically computed (only possible for full head or full brain images).
View results:
tkmedit -f mean.mgz -aux tp1tomean.mgz
Example 2
mri_robust_template --mov 001.mgz 002.mgz --average 1 --template rawavg.mgz --satit --inittp 1 --fixtp --noit --iscale --subsample 200
Is used in the recon-all stream for motion correction of several (here two: 001.mgz and 002.mgz) inputs. In this case all follow-ups are registered to the first input (as specified with --inittp 1 --fixtp --noit) and the rawavg.mgz is output as the median image (--average 1).
Bugs
None (of course)
See Also
Links
References
Highly Accurate Inverse Consistent Registration: A Robust Approach, M. Reuter, H.D. Rosas, B. Fischl. NeuroImage 53 (4), pp. 1181-1196, 2010.
Reporting Bugs
Report bugs to <freesurfer@nmr.mgh.harvard.edu>