dox/Imaging/vtkImageDifference.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00031 #ifndef __vtkImageDifference_h
00032 #define __vtkImageDifference_h
00033
00034 #include "vtkImageTwoInputFilter.h"
00035
00036 class VTK_IMAGING_EXPORT vtkImageDifference : public vtkImageTwoInputFilter
00037 {
00038 public:
00039 static vtkImageDifference *New();
00040 vtkTypeRevisionMacro(vtkImageDifference,vtkImageTwoInputFilter);
00041 void PrintSelf(ostream& os, vtkIndent indent);
00042
00044
00045 void SetImage(vtkImageData *image) {this->SetInput2(image);}
00046 vtkImageData *GetImage() {return this->GetInput2();}
00048
00050
00051 void SetInput(vtkImageData *input) {this->SetInput1(input);}
00052 void SetInput(int num, vtkImageData *input)
00053 { this->vtkImageMultipleInputFilter::SetInput(num, input); };
00055
00057
00058 float GetError(void);
00059 void GetError(float *e) { *e = this->GetError(); };
00061
00063
00066 float GetThresholdedError(void);
00067 void GetThresholdedError(float *e) { *e = this->GetThresholdedError(); };
00069
00070
00072
00073 vtkSetMacro(Threshold,int);
00074 vtkGetMacro(Threshold,int);
00076
00078
00083 vtkSetMacro(AllowShift,int);
00084 vtkGetMacro(AllowShift,int);
00085 vtkBooleanMacro(AllowShift,int);
00087
00089
00092 vtkSetMacro(Averaging,int);
00093 vtkGetMacro(Averaging,int);
00094 vtkBooleanMacro(Averaging,int);
00096
00097 protected:
00098 vtkImageDifference();
00099 ~vtkImageDifference() {};
00100
00101 float ErrorPerThread[VTK_MAX_THREADS];
00102 float ThresholdedErrorPerThread[VTK_MAX_THREADS];
00103 int AllowShift;
00104 int Threshold;
00105 int Averaging;
00106
00107 void ExecuteInformation(vtkImageData **inputs, vtkImageData *output);
00108 void ComputeInputUpdateExtent(int inExt[6], int outExt[6],
00109 int whichInput);
00110 void ExecuteInformation(){this->vtkImageTwoInputFilter::ExecuteInformation();};
00111 void ThreadedExecute(vtkImageData **inDatas, vtkImageData *outData,
00112 int extent[6], int id);
00113
00114 private:
00115 vtkImageDifference(const vtkImageDifference&);
00116 void operator=(const vtkImageDifference&);
00117 };
00118
00119 #endif
00120
00121