Main Page | Directories | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

vtkImageDifference Class Reference

#include <vtkImageDifference.h>

Inheritance diagram for vtkImageDifference:

Inheritance graph
[legend]
Collaboration diagram for vtkImageDifference:

Collaboration graph
[legend]
List of all members.

Detailed Description

Compares images for regression tests.

vtkImageDifference takes two rgb unsigned char images and compares them. It allows the images to be slightly different. If AllowShift is on, then each pixel can be shifted by one pixel. Threshold is the allowable error for each pixel.

Created by:
  • Law, Charles
CVS contributions (if > 5%):
  • Law, Charles (49%)
  • Martin, Ken (16%)
  • Lorensen, Bill (16%)
  • Avila, Lisa (10%)
CVS logs (CVSweb):
  • .h (/Imaging/vtkImageDifference.h)
  • .cxx (/Imaging/vtkImageDifference.cxx)
Tests:
vtkImageDifference (Tests)

Definition at line 45 of file vtkImageDifference.h.

Public Types

typedef vtkImageTwoInputFilter Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
void PrintSelf (ostream &os, vtkIndent indent)
void SetImage (vtkImageData *image)
vtkImageDataGetImage ()
void SetInput (vtkImageData *input)
void SetInput (int num, vtkImageData *input)
double GetError (void)
void GetError (double *e)
double GetThresholdedError (void)
void GetThresholdedError (double *e)
virtual void SetThreshold (int)
virtual int GetThreshold ()
virtual void SetAllowShift (int)
virtual int GetAllowShift ()
virtual void AllowShiftOn ()
virtual void AllowShiftOff ()
virtual void SetAveraging (int)
virtual int GetAveraging ()
virtual void AveragingOn ()
virtual void AveragingOff ()

Static Public Member Functions

vtkImageDifferenceNew ()
int IsTypeOf (const char *type)
vtkImageDifferenceSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkImageDifference ()
 ~vtkImageDifference ()
void ExecuteInformation (vtkImageData **inputs, vtkImageData *output)
void ComputeInputUpdateExtent (int inExt[6], int outExt[6], int whichInput)
void ExecuteInformation ()
void ThreadedExecute (vtkImageData **inDatas, vtkImageData *outData, int extent[6], int id)

Protected Attributes

double ErrorPerThread [VTK_MAX_THREADS]
double ThresholdedErrorPerThread [VTK_MAX_THREADS]
int AllowShift
int Threshold
int Averaging


Member Typedef Documentation

typedef vtkImageTwoInputFilter vtkImageDifference::Superclass
 

Reimplemented from vtkImageTwoInputFilter.

Definition at line 49 of file vtkImageDifference.h.


Constructor & Destructor Documentation

vtkImageDifference::vtkImageDifference  )  [protected]
 

vtkImageDifference::~vtkImageDifference  )  [inline, protected]
 

Definition at line 108 of file vtkImageDifference.h.


Member Function Documentation

vtkImageDifference* vtkImageDifference::New  )  [static]
 

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkAlgorithm.

virtual const char* vtkImageDifference::GetClassName  )  [virtual]
 

Reimplemented from vtkImageTwoInputFilter.

int vtkImageDifference::IsTypeOf const char *  type  )  [static]
 

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkImageTwoInputFilter.

virtual int vtkImageDifference::IsA const char *  type  )  [virtual]
 

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.

Reimplemented from vtkImageTwoInputFilter.

vtkImageDifference* vtkImageDifference::SafeDownCast vtkObject o  )  [static]
 

Reimplemented from vtkImageTwoInputFilter.

void vtkImageDifference::PrintSelf ostream &  os,
vtkIndent  indent
[virtual]
 

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkImageTwoInputFilter.

void vtkImageDifference::SetImage vtkImageData image  )  [inline]
 

Specify the Image to compare the input to.

Definition at line 54 of file vtkImageDifference.h.

References vtkImageTwoInputFilter::SetInput2().

vtkImageData* vtkImageDifference::GetImage  )  [inline]
 

Specify the Image to compare the input to.

Definition at line 55 of file vtkImageDifference.h.

References vtkImageTwoInputFilter::GetInput2().

void vtkImageDifference::SetInput vtkImageData input  )  [inline]
 

Specify the Input for comparison.

Definition at line 60 of file vtkImageDifference.h.

References vtkImageTwoInputFilter::SetInput1().

void vtkImageDifference::SetInput int  num,
vtkImageData input
[inline, virtual]
 

Specify the Input for comparison.

Reimplemented from vtkImageMultipleInputFilter.

Definition at line 61 of file vtkImageDifference.h.

References vtkImageMultipleInputFilter::SetInput().

double vtkImageDifference::GetError void   ) 
 

Return the total error in comparing the two images.

void vtkImageDifference::GetError double *  e  )  [inline]
 

Return the total error in comparing the two images.

Definition at line 68 of file vtkImageDifference.h.

double vtkImageDifference::GetThresholdedError void   ) 
 

Return the total thresholded error in comparing the two images. The thresholded error is the error for a given pixel minus the threshold and clamped at a minimum of zero.

void vtkImageDifference::GetThresholdedError double *  e  )  [inline]
 

Return the total thresholded error in comparing the two images. The thresholded error is the error for a given pixel minus the threshold and clamped at a minimum of zero.

Definition at line 76 of file vtkImageDifference.h.

virtual void vtkImageDifference::SetThreshold int   )  [virtual]
 

Specify a threshold tolerance for pixel differences.

virtual int vtkImageDifference::GetThreshold  )  [virtual]
 

Specify a threshold tolerance for pixel differences.

virtual void vtkImageDifference::SetAllowShift int   )  [virtual]
 

Specify whether the comparison will allow a shift of one pixel between the images. If set, then the minimum difference between input images will be used to determine the difference. Otherwise, the difference is computed directly between pixels of identical row/column values.

virtual int vtkImageDifference::GetAllowShift  )  [virtual]
 

Specify whether the comparison will allow a shift of one pixel between the images. If set, then the minimum difference between input images will be used to determine the difference. Otherwise, the difference is computed directly between pixels of identical row/column values.

virtual void vtkImageDifference::AllowShiftOn  )  [virtual]
 

Specify whether the comparison will allow a shift of one pixel between the images. If set, then the minimum difference between input images will be used to determine the difference. Otherwise, the difference is computed directly between pixels of identical row/column values.

virtual void vtkImageDifference::AllowShiftOff  )  [virtual]
 

Specify whether the comparison will allow a shift of one pixel between the images. If set, then the minimum difference between input images will be used to determine the difference. Otherwise, the difference is computed directly between pixels of identical row/column values.

virtual void vtkImageDifference::SetAveraging int   )  [virtual]
 

Specify whether the comparison will include comparison of averaged 3x3 data between the images. For graphics renderings you normally would leave this on. For imaging operations it should be off.

virtual int vtkImageDifference::GetAveraging  )  [virtual]
 

Specify whether the comparison will include comparison of averaged 3x3 data between the images. For graphics renderings you normally would leave this on. For imaging operations it should be off.

virtual void vtkImageDifference::AveragingOn  )  [virtual]
 

Specify whether the comparison will include comparison of averaged 3x3 data between the images. For graphics renderings you normally would leave this on. For imaging operations it should be off.

virtual void vtkImageDifference::AveragingOff  )  [virtual]
 

Specify whether the comparison will include comparison of averaged 3x3 data between the images. For graphics renderings you normally would leave this on. For imaging operations it should be off.

void vtkImageDifference::ExecuteInformation vtkImageData **  inputs,
vtkImageData output
[protected, virtual]
 

Reimplemented from vtkImageMultipleInputFilter.

void vtkImageDifference::ComputeInputUpdateExtent int  inExt[6],
int  outExt[6],
int  whichInput
[protected, virtual]
 

Reimplemented from vtkImageMultipleInputFilter.

void vtkImageDifference::ExecuteInformation  )  [inline, protected, virtual]
 

Reimplemented from vtkImageMultipleInputFilter.

Definition at line 119 of file vtkImageDifference.h.

References vtkImageMultipleInputFilter::ExecuteInformation().

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

The execute method created by the subclass. This is kept public instead of protected since it is called from a non-member thread function.

Reimplemented from vtkImageMultipleInputFilter.


Member Data Documentation

double vtkImageDifference::ErrorPerThread[VTK_MAX_THREADS] [protected]
 

Definition at line 110 of file vtkImageDifference.h.

double vtkImageDifference::ThresholdedErrorPerThread[VTK_MAX_THREADS] [protected]
 

Definition at line 111 of file vtkImageDifference.h.

int vtkImageDifference::AllowShift [protected]
 

Definition at line 112 of file vtkImageDifference.h.

int vtkImageDifference::Threshold [protected]
 

Definition at line 113 of file vtkImageDifference.h.

int vtkImageDifference::Averaging [protected]
 

Definition at line 114 of file vtkImageDifference.h.


The documentation for this class was generated from the following file: