32#ifndef vtkImageDifference_h
33#define vtkImageDifference_h
35#include "vtkImagingCoreModule.h"
39class vtkImageDifferenceThreadData;
40class vtkImageDifferenceSMPThreadLocal;
76 vtkSetMacro(Threshold,
int);
77 vtkGetMacro(Threshold,
int);
88 vtkSetMacro(AllowShift,
bool);
89 vtkGetMacro(AllowShift,
bool);
90 vtkBooleanMacro(AllowShift,
bool);
100 vtkSetMacro(Averaging,
bool);
101 vtkGetMacro(Averaging,
bool);
102 vtkBooleanMacro(Averaging,
bool);
110 vtkSetMacro(AverageThresholdFactor,
double);
111 vtkGetMacro(AverageThresholdFactor,
double);
121 bool AllowShift =
true;
122 bool Averaging =
true;
124 double AverageThresholdFactor = 0.65;
127 const char* ErrorMessage =
nullptr;
129 double ThresholdedError = 0.;
137 int outExt[6],
int threadId)
override;
146 vtkImageDifferenceSMPThreadLocal* SMPThreadData =
nullptr;
152 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 by the superclass.
void GetThresholdedError(double *e)
a simple class to control print indentation
Generic filter that has one input.