vtkImageLinearFit Class Reference

#include <vtkImageLinearFit.h>

Inheritance diagram for vtkImageLinearFit:

Inheritance graph
[legend]
Collaboration diagram for vtkImageLinearFit:

Collaboration graph
[legend]
List of all members.

Detailed Description

Performs a linear fitting on the input images using linear regression with the supplied input variables.

This filter must have 2 or greater inputs and produces an output with up to 6 components (the maximum in VTK). The inputs must all have the one scalar component, and the same scalar type. The output extents will be the intersection of the input extents and the output scalar type will be double. The first component (c0) will be the r-squared value from the linear regression and the second component (c1) will be the number of values actually fitted. If the StopAtFirstZero option is not turned on the second value will always be the number of inputs. The remaining components depend on the desired fitting and are listed below:

VTK_FIT_LINEAR (requires at least 2 inputs): Y = c2 + c3*X

VTK_FIT_QUADRATIC (requires at least 3 inputs): Y = c2 + c3*X + c4*X^2

VTK_FIT_CUBIC (requires at least 4 inputs): Y = c2 + c3*X + c4*X^2 + c5*X^3

VTK_FIT_EXPONENTIAL (requires at least 2 inputs): Y = c2*exp(c3*X)

VTK_FIT_LOGARITHMIC (requires at least 2 inputs): Y = c2 + c3*ln(X)

VTK_FIT_POWER (requires at least 2 inputs): Y = c2*X^c3

The input variables are set via the SetInputVariables function.

See also:
vtkImageMultipleInputFilter

Definition at line 81 of file vtkImageLinearFit.h.

Public Member Functions

 vtkTypeRevisionMacro (vtkImageLinearFit, vtkImageMultipleInputFilter)
void PrintSelf (ostream &os, vtkIndent indent)
void SetInputVariables (vtkDoubleArray *_arg)
vtkDoubleArrayGetInputVariables ()
void SetFitModel (int model)
virtual int GetFitModel ()
void SetFitModelToLinear ()
void SetFitModelToQuadratic ()
void SetFitModelToCubic ()
void SetFitModelToExponential ()
void SetFitModelToLogarithmic ()
void SetFitModelToPower ()
virtual void SetStopAtFirstZero (int)
virtual int GetStopAtFirstZero ()
virtual void StopAtFirstZeroOn ()
virtual void StopAtFirstZeroOff ()

Static Public Member Functions

static vtkImageLinearFitNew ()
static void CalculateLinearFit (double *X, double *Y, unsigned int num, double &c3, double &c2, double &rSquared)
static void CalculateQuadraticFit (double *X, double *Y, unsigned int num, double &c4, double &c3, double &c2, double &rSquared)
static void CalculateCubicFit (double *X, double *Y, unsigned int num, double &c5, double &c4, double &c3, double &c2, double &rSquared)
static void CalculateExponentialFit (double *X, double *Y, unsigned int num, double &c3, double &c2, double &rSquared)
static void CalculateLogarithmicFit (double *X, double *Y, unsigned int num, double &c3, double &c2, double &rSquared)
static void CalculatePowerFit (double *X, double *Y, unsigned int num, double &c3, double &c2, double &rSquared)

Protected Member Functions

 vtkImageLinearFit ()
 ~vtkImageLinearFit ()
void ExecuteInformation (vtkImageData **inputs, vtkImageData *output)
void ExecuteInformation ()
void ThreadedExecute (vtkImageData **inDatas, vtkImageData *outData, int extent[6], int id)
void InitOutput (int outExt[6], vtkImageData *outData)

Protected Attributes

vtkDoubleArrayInputVariables
int StopAtFirstZero
int FitModel


Constructor & Destructor Documentation

vtkImageLinearFit::vtkImageLinearFit (  )  [protected]

vtkImageLinearFit::~vtkImageLinearFit (  )  [protected]


Member Function Documentation

static vtkImageLinearFit* vtkImageLinearFit::New (  )  [static]

Reimplemented from vtkAlgorithm.

vtkImageLinearFit::vtkTypeRevisionMacro ( vtkImageLinearFit  ,
vtkImageMultipleInputFilter   
)

void vtkImageLinearFit::PrintSelf ( ostream &  os,
vtkIndent  indent 
) [virtual]

Reimplemented from vtkImageMultipleInputFilter.

void vtkImageLinearFit::SetFitModel ( int  model  ) 

Set/Get the fit model.

virtual int vtkImageLinearFit::GetFitModel (  )  [virtual]

Set/Get the fit model.

void vtkImageLinearFit::SetFitModelToLinear (  )  [inline]

Set/Get the fit model.

Definition at line 92 of file vtkImageLinearFit.h.

References VTK_FIT_LINEAR.

void vtkImageLinearFit::SetFitModelToQuadratic (  )  [inline]

Set/Get the fit model.

Definition at line 93 of file vtkImageLinearFit.h.

References VTK_FIT_QUADRATIC.

void vtkImageLinearFit::SetFitModelToCubic (  )  [inline]

Set/Get the fit model.

Definition at line 94 of file vtkImageLinearFit.h.

References VTK_FIT_CUBIC.

void vtkImageLinearFit::SetFitModelToExponential (  )  [inline]

Set/Get the fit model.

Definition at line 95 of file vtkImageLinearFit.h.

References VTK_FIT_EXPONENTIAL.

void vtkImageLinearFit::SetFitModelToLogarithmic (  )  [inline]

Set/Get the fit model.

Definition at line 96 of file vtkImageLinearFit.h.

References VTK_FIT_LOGARITHMIC.

void vtkImageLinearFit::SetFitModelToPower (  )  [inline]

Set/Get the fit model.

Definition at line 97 of file vtkImageLinearFit.h.

References VTK_FIT_POWER.

void vtkImageLinearFit::SetInputVariables ( vtkDoubleArray _arg  ) 

Set the input variables used to perform the linear regression (i.e. X variables).

vtkDoubleArray* vtkImageLinearFit::GetInputVariables (  ) 

Get the input variables.

virtual void vtkImageLinearFit::SetStopAtFirstZero ( int   )  [virtual]

Stop linear fit when the first zero is reached (default is off).

virtual int vtkImageLinearFit::GetStopAtFirstZero (  )  [virtual]

Stop linear fit when the first zero is reached (default is off).

virtual void vtkImageLinearFit::StopAtFirstZeroOn (  )  [virtual]

Stop linear fit when the first zero is reached (default is off).

virtual void vtkImageLinearFit::StopAtFirstZeroOff (  )  [virtual]

Stop linear fit when the first zero is reached (default is off).

static void vtkImageLinearFit::CalculateLinearFit ( double *  X,
double *  Y,
unsigned int  num,
double &  c3,
double &  c2,
double &  rSquared 
) [static]

This function performs a pure linear fit.

static void vtkImageLinearFit::CalculateQuadraticFit ( double *  X,
double *  Y,
unsigned int  num,
double &  c4,
double &  c3,
double &  c2,
double &  rSquared 
) [static]

This function performs a quadratic fit.

static void vtkImageLinearFit::CalculateCubicFit ( double *  X,
double *  Y,
unsigned int  num,
double &  c5,
double &  c4,
double &  c3,
double &  c2,
double &  rSquared 
) [static]

This function performs a cubic fit.

static void vtkImageLinearFit::CalculateExponentialFit ( double *  X,
double *  Y,
unsigned int  num,
double &  c3,
double &  c2,
double &  rSquared 
) [static]

This function performs an exponential fit.

static void vtkImageLinearFit::CalculateLogarithmicFit ( double *  X,
double *  Y,
unsigned int  num,
double &  c3,
double &  c2,
double &  rSquared 
) [static]

This function performs a logarithmic fit.

static void vtkImageLinearFit::CalculatePowerFit ( double *  X,
double *  Y,
unsigned int  num,
double &  c3,
double &  c2,
double &  rSquared 
) [static]

This function performs a power fit.

void vtkImageLinearFit::ExecuteInformation ( vtkImageData **  inputs,
vtkImageData output 
) [protected, virtual]

Reimplemented from vtkImageMultipleInputFilter.

void vtkImageLinearFit::ExecuteInformation (  )  [inline, protected, virtual]

Reimplemented from vtkImageMultipleInputFilter.

Definition at line 158 of file vtkImageLinearFit.h.

References vtkImageMultipleInputFilter::ExecuteInformation().

void vtkImageLinearFit::ThreadedExecute ( vtkImageData **  inDatas,
vtkImageData outData,
int  extent[6],
int  id 
) [protected, virtual]

Reimplemented from vtkImageMultipleInputFilter.

void vtkImageLinearFit::InitOutput ( int  outExt[6],
vtkImageData outData 
) [protected]


Member Data Documentation

vtkDoubleArray* vtkImageLinearFit::InputVariables [protected]

Definition at line 165 of file vtkImageLinearFit.h.

int vtkImageLinearFit::StopAtFirstZero [protected]

Definition at line 167 of file vtkImageLinearFit.h.

int vtkImageLinearFit::FitModel [protected]

Definition at line 169 of file vtkImageLinearFit.h.


The documentation for this class was generated from the following file:
Generated on Tue May 12 14:53:25 2009 for vtkCNMRRLibrary by  doxygen 1.4.7