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