00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00039 #ifndef __vtkImageDifference_h
00040 #define __vtkImageDifference_h
00041
00042 #include "vtkThreadedImageAlgorithm.h"
00043
00044 class VTK_IMAGING_EXPORT vtkImageDifference : public vtkThreadedImageAlgorithm
00045 {
00046 public:
00047 static vtkImageDifference *New();
00048 vtkTypeRevisionMacro(vtkImageDifference,vtkThreadedImageAlgorithm);
00049 void PrintSelf(ostream& os, vtkIndent indent);
00050
00052
00053 void SetImage(vtkDataObject *image) {this->SetInput(1,image);}
00054 vtkImageData *GetImage();
00056
00058
00059 double GetError(void);
00060 void GetError(double *e) { *e = this->GetError(); };
00062
00064
00067 double GetThresholdedError(void);
00068 void GetThresholdedError(double *e) { *e = this->GetThresholdedError(); };
00070
00071
00073
00074 vtkSetMacro(Threshold,int);
00075 vtkGetMacro(Threshold,int);
00077
00079
00084 vtkSetMacro(AllowShift,int);
00085 vtkGetMacro(AllowShift,int);
00086 vtkBooleanMacro(AllowShift,int);
00088
00090
00093 vtkSetMacro(Averaging,int);
00094 vtkGetMacro(Averaging,int);
00095 vtkBooleanMacro(Averaging,int);
00097
00098 protected:
00099 vtkImageDifference();
00100 ~vtkImageDifference() {};
00101
00102 double ErrorPerThread[VTK_MAX_THREADS];
00103 double ThresholdedErrorPerThread[VTK_MAX_THREADS];
00104 int AllowShift;
00105 int Threshold;
00106 int Averaging;
00107
00108 virtual int RequestInformation (vtkInformation *,
00109 vtkInformationVector **,
00110 vtkInformationVector *);
00111 virtual int RequestUpdateExtent(vtkInformation *,
00112 vtkInformationVector **,
00113 vtkInformationVector *);
00114
00115 virtual void ThreadedRequestData(vtkInformation *request,
00116 vtkInformationVector **inputVector,
00117 vtkInformationVector *outputVector,
00118 vtkImageData ***inData,
00119 vtkImageData **outData,
00120 int extent[6], int threadId);
00121
00122 private:
00123 vtkImageDifference(const vtkImageDifference&);
00124 void operator=(const vtkImageDifference&);
00125 };
00126
00127 #endif
00128
00129