Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | 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 =========================================================================*/
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&);  // Not implemented.
00124   void operator=(const vtkImageDifference&);  // Not implemented.
00125 };
00126 
00127 #endif
00128 
00129 

Generated on Mon Jan 21 23:07:29 2008 for VTK by  doxygen 1.4.3-20050530