39#ifndef vtkImageDifference_h
40#define vtkImageDifference_h
42#include "vtkImagingCoreModule.h"
46VTK_ABI_NAMESPACE_BEGIN
47class vtkImageDifferenceThreadData;
48class vtkImageDifferenceSMPThreadLocal;
84 vtkSetMacro(Threshold,
int);
85 vtkGetMacro(Threshold,
int);
96 vtkSetMacro(AllowShift,
bool);
97 vtkGetMacro(AllowShift,
bool);
98 vtkBooleanMacro(AllowShift,
bool);
108 vtkSetMacro(Averaging,
bool);
109 vtkGetMacro(Averaging,
bool);
110 vtkBooleanMacro(Averaging,
bool);
118 vtkSetMacro(AverageThresholdFactor,
double);
119 vtkGetMacro(AverageThresholdFactor,
double);
129 bool AllowShift =
true;
130 bool Averaging =
true;
132 double AverageThresholdFactor = 0.65;
135 const char* ErrorMessage =
nullptr;
137 double ThresholdedError = 0.;
145 int outExt[6],
int threadId)
override;
154 vtkImageDifferenceSMPThreadLocal* SMPThreadData =
nullptr;
160 friend class vtkImageDifferenceSMPFunctor;
Proxy object to connect input/output ports.
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
Set the connection for the given input port index.
general representation of visualization data
void SetInputData(vtkDataObject *)
Assign a data object as input.
topologically and geometrically regular array of data
Compares images for regression tests.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int ComputeSumedValue(unsigned char *values, vtkIdType *indices, int comp)
void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int outExt[6], int threadId) override
If the subclass does not define an Execute method, then the task will be broken up,...
void SetImageConnection(vtkAlgorithmOutput *output)
Specify the Image to compare the input to.
~vtkImageDifference() override=default
double GetThresholdedError()
Return the total thresholded error in comparing the two images.
static vtkImageDifference * New()
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to translate the update extent requests from each output port ...
void GrowExtent(int *uExt, int *wholeExtent)
int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to collect information from their inputs and set information f...
vtkImageDifferenceThreadData * ThreadData
double GetError()
Return the total error in comparing the two images.
vtkImageData * GetImage()
Specify the Image to compare the input to.
void SetImageData(vtkDataObject *image)
Specify the Image to compare the input to.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called in response to a REQUEST_DATA request from the executive.
void GetThresholdedError(double *e)
a simple class to control print indentation
Generic filter that has one input.