Fit Line (Fit_LineTP)
 
Author: J. Anthony Parker, MD PhD (J.A.Parker@IEEE.org
Dates: 2003/07/21: First version
2005/01/10: Additional options added
Source: The source files are Fit_LineTP.java and nucmed/Fit.java.  The data file, FitSliceTimes.txt, allows entry of slice durations for groups of slices.
Installation: Download NucMed_TP.jar to the plugins folder and restart ImageJ.  Fit_LineTP.class and nucmed/Fit.class are the two files needed for this plugin.  FitSliceTimes.txt is optional.
Description: This ImageJ PlugInFilter fits a straight line to a set of data points in a ResultsTable or in a file.  The slope and intercept of successive fits are saved as lines in a text window.  Also saved is the chi square value and a goodness-of-fit parameter, 1-P, where P is the usual P-value.

An estimate of the Standard Deviation, SD, due to noise in the data (True SD) can be entered (see Numerical Recipes 15.2).  If the "True SD" is not entered, the Chi-sq and goodness-of-fit values are affected.

There are four possible methods fitting methods.  Initially, this plugin (1) searches for the N points with the largest slope.  Optionally, (2) it then adds points to the start and end so long as a figure-of-merit (FOM) increases.  On subsequent fitting steps, it either (3) fits between a given start and end range or (4) searches for the set of N or more points within that range which have the largest figure-of-merit.  Use weights of 0.0 for the second and third term in the FOM in order to search for the N points with the greatest slope.

Install with "about" in the argument and an about message is printed.

FitSliceTimes.txt allows different time durations for different slices in the stack.  It is looked for first in the directory which contains the source file (if any).  If it is not found there, then the plugins/NucMed/ directory is search.  FitSliceTimes.txt lists groups of slices.  The Nslices column gives the number of slices in a group and the Time column gives the time per slice.  For example, a file with the following contents describes 120 slices collected at 1 second per slice followed by 20 slices collected at 15 seconds per slice.

Nslices
Time
1
120
1
2
20
15
FitSliceTimes.txt can be edited with any text editor.  The fields are separated by the  <tab> character.
| Parker Plugins | Parker Applets | ImageJ Plugins | ImageJ Home |