VTK
vtkImageDifference.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageDifference.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
39 #ifndef vtkImageDifference_h
40 #define vtkImageDifference_h
41 
42 #include "vtkImagingCoreModule.h" // For export macro
44 
46 {
47 public:
48  static vtkImageDifference *New();
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
53 
55  {
56  this->SetInputConnection(1, output);
57  }
58  void SetImageData(vtkDataObject *image) {this->SetInputData(1,image);}
59  vtkImageData *GetImage();
61 
63 
64  double GetError(void);
65  void GetError(double *e) { *e = this->GetError(); };
67 
69 
72  double GetThresholdedError(void);
73  void GetThresholdedError(double *e) { *e = this->GetThresholdedError(); };
75 
76 
78 
79  vtkSetMacro(Threshold,int);
80  vtkGetMacro(Threshold,int);
82 
84 
89  vtkSetMacro(AllowShift,int);
90  vtkGetMacro(AllowShift,int);
91  vtkBooleanMacro(AllowShift,int);
93 
95 
98  vtkSetMacro(Averaging,int);
99  vtkGetMacro(Averaging,int);
100  vtkBooleanMacro(Averaging,int);
102 
103 protected:
106 
107  double ErrorPerThread[VTK_MAX_THREADS];
108  double ThresholdedErrorPerThread[VTK_MAX_THREADS];
112 
113  virtual int RequestInformation (vtkInformation *,
116  virtual int RequestUpdateExtent(vtkInformation *,
119 
120  virtual void ThreadedRequestData(vtkInformation *request,
121  vtkInformationVector **inputVector,
122  vtkInformationVector *outputVector,
123  vtkImageData ***inData,
124  vtkImageData **outData,
125  int extent[6], int threadId);
126 
127 private:
128  vtkImageDifference(const vtkImageDifference&); // Not implemented.
129  void operator=(const vtkImageDifference&); // Not implemented.
130 };
131 
132 #endif
133 
134 
void GetError(double *e)
Store vtkAlgorithm input/output information.
Compares images for regression tests.
#define VTK_MAX_THREADS
Definition: vtkConfigure.h:41
void SetImageData(vtkDataObject *image)
void GetThresholdedError(double *e)
void SetInputData(vtkDataObject *)
void PrintSelf(ostream &os, vtkIndent indent)
void SetImageConnection(vtkAlgorithmOutput *output)
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Proxy object to connect input/output ports.
Generic filter that has one input..
a simple class to control print indentation
Definition: vtkIndent.h:38
int Threshold(vtkDataSet *input, vtkUnstructuredGrid *output, vtkDataArray *field, double lower, double upper)
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTKIMAGINGCORE_EXPORT
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int threadId)
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
general representation of visualization data
Definition: vtkDataObject.h:64