## Note: This page was created with the CommandTemplate
##
## If you're modifying this page please take a look at the
## latest version of CommandTemplate to ensure that you're
## using the latest version of the CommandTemplate
##
## See HelpOnCommandTemplate for description of formatting
'''Index''' <<TableOfContents>>

= Name =
mri_ms_fitparms - Estimates tissue parameter maps (T1, proton density) from multi-spectral FLASH MRI

= Synopsis =
mri_ms_fitparms [options] <volume1> <volume2> ... <output directory>

= Arguments =
== Positional Arguments ==
||volume1 ||3D FLASH flip angle1 ||Volume must be in mgh format ||
||volume2 ||3D FLASH flip angle2 ||Volume must be in mgh format ||
||output directory ||Where T1 and PD maps are written ||


== Required Flagged Arguments ==
None

== Optional Flagged Arguments ==
||-afi, -fam ||Designate flip angle map, we assume that the nominal flip angle is 60 degrees if B1 was homogeneous <also assumes that the afi map is registered to the flash volumes> ||
||-ait ||Apply inverse of transform ||
||-at ||Set acquisition time ||
||-conform ||Interpolate volume to be isotropic 1mm^3 ||
||-correct ||Correct proton density map (PD) by T2* estimates ||
||-cubic ||Use cubic interpolation ||
||-dt ||Numerical integration time step used to estimate the flip angle field from multiple acquisitions of different flip angles and/or TRs ||
||-fa ||Flip angle (degrees) ||
||-fa_scale ||Set value to scale all flip angles by ||
||-faf ||Designate flip angle map to use with specified control points ||
||-fsmooth ||Smooth flip angle map for X iterations of soap bubble smoothing (thres=??) ||
||-i ||Invert ||
||-m ||Set momentum ||
||-max ||Set max T2* ||
||-n ||Perform estimation/motion correction X times (-n 0 runs without motion correction) ||
||-nearest ||Use nearest-neighbor interpolation ||
||-nocompress ||Do not compress output volumes (save as .mgh) ||
||-nosynth ||Disable volume synthesis ||
||-r ||write out residuals to designated location ||
||-s ||Smooth faf field with sigma=X ||
||-scale ||Scale volumes by X after reading ||
||-sinc ||Use sinc interpolation (default window width is 6) ||
||-t ||Apply transform to output volumes ||
||-te ||Echo time (ms) ||
||-tr ||Repetition time (ms) ||
||-trilinear ||Use trilinear interpolation ||
||-tukey ||Use tukey bi-weight of residuals ||
||-u ||??? ||
||-use_brain_mask ||Compute a brain mask from the PD map and use it when computing registration ||
||-w ||Write out intermediate results every X iterations ||
||-window ||??? ||


= Outputs =
||T1.mgz ||Compressed T1 map ||
||PD.mgz ||Compressed Proton Density map ||
||vol0.mgz ||Compressed Synthetic volume for input <volume1>, in motion corrected space ||
||vol0.lta ||Motion correction afine information (text file) ||
||vol1.mgz ||Compressed Synthetic volume for input <volume2>, in motion corrected space ||
||vol1.lta ||Motion correction afine information (text file) ||


= Description =
This program takes an arbitrary # of FLASH images as input, and estimates the T1 and PD values of the data for voxel, as well as a linear transform aligning each of the images. The T1 and PD maps are written into <output directory> together with synthetic volumes names vol?.mgh, one for each of the input volumes. All the output volumes are generated in the common (motion-corrected) space. Note that TR, TE and the flip angle are read directly from the image header. If this information is not available, it can be specified on the command line using -tr <TR in msec> -te <TE in msec> -fa <flip angle in degrees> before each volume.

= Examples =
== Example 1 ==
cd subjectid/mri/flash

mri_ms_fitparms -tr 20 -te 6 -fa 5 flash5.mgh -tr 20 -te 6 -fa 30 flash30.mgh .

Description:  Two 3D FLASH volumes (flip angles 5 and 30 degrees), both acquired with the same TE (20ms) and TR (6ms) are used to fit T1 and PD map and write the results on the same directory (subjectid/mri/flash).

= Bugs =
None

= See Also =
||[[mri_convert]] ||(to convert input volumes to mgh format) || ||
||[[mri_synthesize]] ||(to use the T1 and PD maps to create synthetic images) || ||


= Links =
FreeSurfer

= Methods Description =
{{{
N/A
}}}
= References =
None

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

= Author/s =
BruceFischl