Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Imaging/vtkImageDifference.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkImageDifference.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00027 #ifndef __vtkImageDifference_h 00028 #define __vtkImageDifference_h 00029 00030 #include "vtkImageTwoInputFilter.h" 00031 00032 class VTK_IMAGING_EXPORT vtkImageDifference : public vtkImageTwoInputFilter 00033 { 00034 public: 00035 static vtkImageDifference *New(); 00036 vtkTypeRevisionMacro(vtkImageDifference,vtkImageTwoInputFilter); 00037 void PrintSelf(ostream& os, vtkIndent indent); 00038 00040 00041 void SetImage(vtkImageData *image) {this->SetInput2(image);} 00042 vtkImageData *GetImage() {return this->GetInput2();} 00044 00046 00047 void SetInput(vtkImageData *input) {this->SetInput1(input);} 00048 void SetInput(int num, vtkImageData *input) 00049 { this->vtkImageMultipleInputFilter::SetInput(num, input); }; 00051 00053 00054 double GetError(void); 00055 void GetError(double *e) { *e = this->GetError(); }; 00057 00059 00062 double GetThresholdedError(void); 00063 void GetThresholdedError(double *e) { *e = this->GetThresholdedError(); }; 00065 00066 00068 00069 vtkSetMacro(Threshold,int); 00070 vtkGetMacro(Threshold,int); 00072 00074 00079 vtkSetMacro(AllowShift,int); 00080 vtkGetMacro(AllowShift,int); 00081 vtkBooleanMacro(AllowShift,int); 00083 00085 00088 vtkSetMacro(Averaging,int); 00089 vtkGetMacro(Averaging,int); 00090 vtkBooleanMacro(Averaging,int); 00092 00093 protected: 00094 vtkImageDifference(); 00095 ~vtkImageDifference() {}; 00096 00097 double ErrorPerThread[VTK_MAX_THREADS]; 00098 double ThresholdedErrorPerThread[VTK_MAX_THREADS]; 00099 int AllowShift; 00100 int Threshold; 00101 int Averaging; 00102 00103 void ExecuteInformation(vtkImageData **inputs, vtkImageData *output); 00104 void ComputeInputUpdateExtent(int inExt[6], int outExt[6], 00105 int whichInput); 00106 void ExecuteInformation(){this->vtkImageTwoInputFilter::ExecuteInformation();}; 00107 void ThreadedExecute(vtkImageData **inDatas, vtkImageData *outData, 00108 int extent[6], int id); 00109 00110 private: 00111 vtkImageDifference(const vtkImageDifference&); // Not implemented. 00112 void operator=(const vtkImageDifference&); // Not implemented. 00113 }; 00114 00115 #endif 00116 00117