Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members   Related Pages  

vtkImageDifference Class Reference

Compares images for regression tests. More...

#include <vtkImageDifference.h>

Inheritance diagram for vtkImageDifference:

Inheritance graph
[legend]
Collaboration diagram for vtkImageDifference:

Collaboration graph
[legend]
List of all members.

Public Methods

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)
float GetError (void)
void GetError (float *e)
float GetThresholdedError (void)
void GetThresholdedError (float *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 Methods

vtkImageDifference * New ()
int IsTypeOf (const char *type)
vtkImageDifference * SafeDownCast (vtkObject *o)

Protected Methods

 vtkImageDifference ()
 ~vtkImageDifference ()
 vtkImageDifference (const vtkImageDifference &)
void operator= (const 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

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

Detailed Description

Compares images for regression tests.

Date:
2000/12/10 20:09:05
Revision:
1.21

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.

Examples:
vtkImageDifference (examples)


Member Function Documentation

virtual const char* vtkImageDifference::GetClassName   [virtual]
 

Return the class name as a string. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkImageTwoInputFilter.

float vtkImageDifference::GetError void   
 

Return the total error in comparing the two images.

float 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.

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 vtkTypeMacro found in vtkSetGet.h.

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 vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkImageTwoInputFilter.

vtkImageDifference* vtkImageDifference::New   [static]
 

Instantiate object with no start, end, or progress methods.

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 vtkImageMultipleInputFilter.

vtkImageDifference* vtkImageDifference::SafeDownCast vtkObject   o [static]
 

Will cast the supplied object to vtkObject* is this is a safe operation (i.e., a safe downcast); otherwise NULL is returned. This method is defined in all subclasses of vtkObject with the vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkImageTwoInputFilter.

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 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.

void vtkImageDifference::SetImage vtkImageData   image [inline]
 

Specify the Image to compare the input to.

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

Set an Input of this filter.

Reimplemented from vtkImageMultipleInputFilter.

void vtkImageDifference::SetInput vtkImageData   input [inline]
 

Specify the Input for comparison.

virtual void vtkImageDifference::SetThreshold int    [virtual]
 

Specify a threshold tolerance for pixel differences.

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.


The documentation for this class was generated from the following file:
Generated on Tue Mar 19 13:26:09 2002 for VTK by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002