If none of the built-in fitting functions meets your needs, you can build your own using the General Least-Squares tab:
As an example, let's imagine you have a series of gradient-echo images collected different flip angles and a long TR for the purposes of performing a flip-angle calibration. We might expect the signal intensity to vary as the sine of the true flip angle. Thus, you want to fit function of the form:I=M0*sin(k*α)
where I is the measured signal intensity; M0 is the fully-relaxed signal
intensity for a 90° pulse; α is the nominal flip angle and k is a
spatially-dependent multiplier that converts the nominal flip angle into the actual flip
angle. The objective is to map k.
The function to be fitted is entered in the Fit function panel:
You can either type in the function, or you can build up the
function from the
If the function contains any illegal elements, you will be notified
when you try to perform the fit.
The fit variables are estimated on a pixel-by-pixel basis, and must appear in
the fit function. You set the number of fit variables,
their names and other parameters in the Fit variables panel. We have done below that for our
example, which requires two fit variables:
Then, for each of the fit variables, enter:
Note: You can force the Image Fitter to always produce output images
of floating-point datatype if your wish. To do this, select the
check-box. This makes scaling the output images unnecessary,
unless you have other reasons for doing so.
Operators
, Functions
and Constants
menus: clicking on one of the items in
the menus inserts an appropriate piece of text to help build up
the function.
In the function, you can use:
Functions
menu for a list of
built-in functions.
Constants
menu for a list of
built-in constants.
The Independent Variable Name
By default, the independent variable in the fit function is
"x". You can change this so that the fit function is easier to
read and more physically meaningful. In our example, we are varying the flip angle, we we have
changed the independent variable name to "alpha".
Optionally, you can scale all the values of the independent variable that you enter by a scaling
factor. In this example we want to enter the flip angles in degrees, but the sine function
requires angles to be specified in radians. To convert degrees to radians, we enter an independent
variable scaling factor of 0.0174533, since 1 degree equals 0.0174533 radians.
Built-in Functions
The fitter has the following built-in functions that you can
use in your fit function:
Built-in Constants
The fitter has the following built-in constants:
The fit variables