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:
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);}
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 
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 
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 
vtkImageDifference::~vtkImageDifference
~vtkImageDifference()
Definition: vtkImageDifference.h:105
vtkImageDifference::GetThresholdedError
void GetThresholdedError(double *e)
Definition: vtkImageDifference.h:73
vtkImageDifference::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkImageDifference::SetImageData
void SetImageData(vtkDataObject *image)
Definition: vtkImageDifference.h:58
vtkImageDifference::SetImageConnection
void SetImageConnection(vtkAlgorithmOutput *output)
Definition: vtkImageDifference.h:54
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkImageDifference
Compares images for regression tests.
Definition: vtkImageDifference.h:46
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkThreadedImageAlgorithm
Generic filter that has one input..
Definition: vtkThreadedImageAlgorithm.h:37
vtkImageDifference::GetThresholdedError
double GetThresholdedError(void)
vtkImageDifference::RequestInformation
virtual int RequestInformation(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkImageDifference::New
static vtkImageDifference * New()
vtkImageDifference::GetError
void GetError(double *e)
Definition: vtkImageDifference.h:65
vtkImageDifference::GetError
double GetError(void)
vtkThreadedImageAlgorithm.h
vtkDax::Threshold
int Threshold(vtkDataSet *input, vtkUnstructuredGrid *output, vtkDataArray *field, double lower, double upper)
Definition: vtkDaxThresholdImpl.h:147
vtkImageAlgorithm::SetInputData
void SetInputData(vtkDataObject *)
VTK_MAX_THREADS
#define VTK_MAX_THREADS
Definition: vtkConfigure.h:41
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkImageDifference::AllowShift
int AllowShift
Definition: vtkImageDifference.h:109
vtkImageDifference::GetImage
vtkImageData * GetImage()
vtkGetMacro
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:93
vtkImageDifference::ThreadedRequestData
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int threadId)
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
vtkAlgorithm::SetInputConnection
virtual void SetInputConnection(int port, vtkAlgorithmOutput *input)
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
vtkImageDifference::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:39
vtkImagingCoreModule.h
vtkX3D::extent
@ extent
Definition: vtkX3D.h:345
vtkImageDifference::vtkImageDifference
vtkImageDifference()
VTKIMAGINGCORE_EXPORT
#define VTKIMAGINGCORE_EXPORT
Definition: vtkImagingCoreModule.h:15
vtkImageDifference::Threshold
int Threshold
Definition: vtkImageDifference.h:110
vtkDataObject
general representation of visualization data
Definition: vtkDataObject.h:65
vtkImageDifference::Averaging
int Averaging
Definition: vtkImageDifference.h:111
vtkgl::image
GLenum GLsizei GLenum GLenum const GLvoid * image
Definition: vtkgl.h:11341