Image Fitting - Introduction
The Image Fitting tool performs non-linear least-squares
regression (fitting) on a series of images that represent
different values of a variable. For example, the series could be
different echo times in a set MR scans, and the fitting would be
done to estimate the transverse relaxation time on a
pixel-by-pixel basis.
The Image Fitting tool is very powerful and flexible - it can fit
virtually any function to a set on images representing different
independent variable ("x") values. On the other hand, the tool comes
with a set of "preset" formulas, so that you can set up for
some of the more common fitting tasks, such as inversion-recovery
or saturation recovery T1 estimation, diffusion
coefficient or T2 estimation. In addition,
there is a "roaming fit" facility, where the fit parameters are
estimated for pixels within a region of
interest. The fit is illustrated on a graph showing the pixel
intensity values and the fitted function, so that you can
interactively investigate your data, and assess the quality of the
fits.
The Fitting Tool produces a set of new images - one image for
every fit variable. The new images contain the estimates of the
fit variables in every pixel.
Start the Image Fitting tool from the Toolkits
menu:
The Image Fitting frame will now appear as shown below:
The procedure for performing image fitting can be summarised as
follows:
- Decide on the name of the independent variable. This can
simply be "x" (the default), or can be chosen to reflect the
physical parameter that varies in your set of images. For example,
if you are fitting to multiple echo time data to estimate
T2, then you could change the independent
variable name to "TE".
- Choose the number of fit variables, and the fit variable
names, their physically-meaningful limits, and an initial guess at
the fitted value.
The names should be chosen to reflect the physical parameters that are
to be estimated. For example, for T2 fitting
you would choose:
- "M0" the initial transverse magnetisation.
- "T2" the transverse relaxation time.
- Enter your formula. The formula can use:
- The operators *, /, +, - and ^ that can be seen in the
Operators
menu. You can also use parentheses (..).
- Any of the built in functions that can be seen in
Functions
menu.
- The constants pi and e that can be seen in the
Constants
menu.
- The independent variable name that you set ("x" by default).
- The fit variable names.
You can either type in the formula, or use the Operators,
Functions and Constants menu to insert text into the formula.
For example, for T2 fitting
you would enter:
"M0*exp(-TE/T2)"
- Decide how many input images you want to work with. There are
basically two options:
- You have one input image for each value of the independent
variable. For example, you have ten echo times, and therefore ten input images
each containing all the image slices for a given echo time.
- All the independent variable values are in one image.
You set up the Image Fitting tool so that it understands the
structure of your data.
- Set the "base name" for the output images. Each output image
will have a name composed of the base name, and the fit variable name.
Each input image must be of the same dimensionality (i.e., the
same number of slices, and rows and columns within the slice) as all the
others. The Fitting Tool then works through every pixel in the set of input
images, and fits the formula to produce a set of output images
- one for each of the fit variables containing the pixel-by-pixel
estimates of the variables.