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

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 =========================================================================*/
00040 #ifndef __vtkImageDifference_h
00041 #define __vtkImageDifference_h
00042 
00043 #include "vtkImageTwoInputFilter.h"
00044 
00045 class VTK_IMAGING_EXPORT vtkImageDifference : public vtkImageTwoInputFilter
00046 {
00047 public:
00048   static vtkImageDifference *New();
00049   vtkTypeRevisionMacro(vtkImageDifference,vtkImageTwoInputFilter);
00050   void PrintSelf(ostream& os, vtkIndent indent);
00051 
00053 
00054   void SetImage(vtkImageData *image) {this->SetInput2(image);}
00055   vtkImageData *GetImage() {return this->GetInput2();}
00057 
00059 
00060   void SetInput(vtkImageData *input) {this->SetInput1(input);}
00061   void SetInput(int num, vtkImageData *input)
00062     { this->vtkImageMultipleInputFilter::SetInput(num, input); };
00064   
00066 
00067   double GetError(void);
00068   void GetError(double *e) { *e = this->GetError(); };
00070   
00072 
00075   double GetThresholdedError(void);
00076   void GetThresholdedError(double *e) { *e = this->GetThresholdedError(); };
00078 
00079 
00081 
00082   vtkSetMacro(Threshold,int);
00083   vtkGetMacro(Threshold,int);
00085 
00087 
00092   vtkSetMacro(AllowShift,int);
00093   vtkGetMacro(AllowShift,int);
00094   vtkBooleanMacro(AllowShift,int);
00096 
00098 
00101   vtkSetMacro(Averaging,int);
00102   vtkGetMacro(Averaging,int);
00103   vtkBooleanMacro(Averaging,int);
00105 
00106 protected:
00107   vtkImageDifference();
00108   ~vtkImageDifference() {};
00109 
00110   double ErrorPerThread[VTK_MAX_THREADS];
00111   double ThresholdedErrorPerThread[VTK_MAX_THREADS];
00112   int AllowShift;
00113   int Threshold;
00114   int Averaging;
00115   
00116   void ExecuteInformation(vtkImageData **inputs, vtkImageData *output); 
00117   void ComputeInputUpdateExtent(int inExt[6], int outExt[6],
00118                                 int whichInput);
00119   void ExecuteInformation(){this->vtkImageTwoInputFilter::ExecuteInformation();};
00120   void ThreadedExecute(vtkImageData **inDatas, vtkImageData *outData,
00121                        int extent[6], int id);  
00122   
00123 private:
00124   vtkImageDifference(const vtkImageDifference&);  // Not implemented.
00125   void operator=(const vtkImageDifference&);  // Not implemented.
00126 };
00127 
00128 #endif
00129 
00130