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 
43 
45 {
46 public:
47  static vtkImageDifference *New();
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
52 
53  void SetImage(vtkDataObject *image) {this->SetInput(1,image);}
54  vtkImageData *GetImage();
56 
58 
59  double GetError(void);
60  void GetError(double *e) { *e = this->GetError(); };
62 
64 
67  double GetThresholdedError(void);
68  void GetThresholdedError(double *e) { *e = this->GetThresholdedError(); };
70 
71 
73 
74  vtkSetMacro(Threshold,int);
75  vtkGetMacro(Threshold,int);
77 
79 
84  vtkSetMacro(AllowShift,int);
85  vtkGetMacro(AllowShift,int);
86  vtkBooleanMacro(AllowShift,int);
88 
90 
93  vtkSetMacro(Averaging,int);
94  vtkGetMacro(Averaging,int);
95  vtkBooleanMacro(Averaging,int);
97 
98 protected:
101 
102  double ErrorPerThread[VTK_MAX_THREADS];
103  double ThresholdedErrorPerThread[VTK_MAX_THREADS];
107 
108  virtual int RequestInformation (vtkInformation *,
111  virtual int RequestUpdateExtent(vtkInformation *,
114 
115  virtual void ThreadedRequestData(vtkInformation *request,
116  vtkInformationVector **inputVector,
117  vtkInformationVector *outputVector,
118  vtkImageData ***inData,
119  vtkImageData **outData,
120  int extent[6], int threadId);
121 
122 private:
123  vtkImageDifference(const vtkImageDifference&); // Not implemented.
124  void operator=(const vtkImageDifference&); // Not implemented.
125 };
126 
127 #endif
128 
129 
void GetError(double *e)
Store vtkAlgorithm input/output information.
Compares images for regression tests.
void GetThresholdedError(double *e)
void SetImage(vtkDataObject *image)
void PrintSelf(ostream &os, vtkIndent indent)
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Generic filter that has one input..
void SetInput(vtkDataObject *)
a simple class to control print indentation
Definition: vtkIndent.h:37
#define VTK_IMAGING_EXPORT
topologically and geometrically regular array of data
Definition: vtkImageData.h:43
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
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:70