00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00055 #ifndef __vtkImageDifference_h
00056 #define __vtkImageDifference_h
00057
00058 #include "vtkImageTwoInputFilter.h"
00059
00060 class VTK_IMAGING_EXPORT vtkImageDifference : public vtkImageTwoInputFilter
00061 {
00062 public:
00063 static vtkImageDifference *New();
00064 vtkTypeMacro(vtkImageDifference,vtkImageTwoInputFilter);
00065 void PrintSelf(ostream& os, vtkIndent indent);
00066
00068
00069 void SetImage(vtkImageData *image) {this->SetInput2(image);}
00070 vtkImageData *GetImage() {return this->GetInput2();}
00072
00074
00075 void SetInput(vtkImageData *input) {this->SetInput1(input);}
00076 void SetInput(int num, vtkImageData *input)
00077 { this->vtkImageMultipleInputFilter::SetInput(num, input); };
00079
00081
00082 float GetError(void);
00083 void GetError(float *e) { *e = this->GetError(); };
00085
00087
00090 float GetThresholdedError(void);
00091 void GetThresholdedError(float *e) { *e = this->GetThresholdedError(); };
00093
00094
00096
00097 vtkSetMacro(Threshold,int);
00098 vtkGetMacro(Threshold,int);
00100
00102
00107 vtkSetMacro(AllowShift,int);
00108 vtkGetMacro(AllowShift,int);
00109 vtkBooleanMacro(AllowShift,int);
00111
00113
00116 vtkSetMacro(Averaging,int);
00117 vtkGetMacro(Averaging,int);
00118 vtkBooleanMacro(Averaging,int);
00120
00121 protected:
00122 vtkImageDifference();
00123 ~vtkImageDifference() {};
00124
00125 float ErrorPerThread[VTK_MAX_THREADS];
00126 float ThresholdedErrorPerThread[VTK_MAX_THREADS];
00127 int AllowShift;
00128 int Threshold;
00129 int Averaging;
00130
00131 void ExecuteInformation(vtkImageData **inputs, vtkImageData *output);
00132 void ComputeInputUpdateExtent(int inExt[6], int outExt[6],
00133 int whichInput);
00134 void ExecuteInformation(){this->vtkImageTwoInputFilter::ExecuteInformation();};
00135 void ThreadedExecute(vtkImageData **inDatas, vtkImageData *outData,
00136 int extent[6], int id);
00137
00138 private:
00139 vtkImageDifference(const vtkImageDifference&);
00140 void operator=(const vtkImageDifference&);
00141 };
00142
00143 #endif
00144
00145