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

Imaging/vtkImageAnisotropicDiffusion2D.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageAnisotropicDiffusion2D.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 =========================================================================*/
00042 #ifndef __vtkImageAnisotropicDiffusion2D_h
00043 #define __vtkImageAnisotropicDiffusion2D_h
00044 
00045 
00046 #include "vtkImageSpatialFilter.h"
00047 class VTK_IMAGING_EXPORT vtkImageAnisotropicDiffusion2D : public vtkImageSpatialFilter
00048 {
00049 public:
00050   static vtkImageAnisotropicDiffusion2D *New();
00051   vtkTypeRevisionMacro(vtkImageAnisotropicDiffusion2D,vtkImageSpatialFilter);
00052   void PrintSelf(ostream& os, vtkIndent indent);
00053 
00059   void SetNumberOfIterations(int num);
00060 
00062 
00063   vtkGetMacro(NumberOfIterations,int);
00065 
00067 
00072   vtkSetMacro(DiffusionThreshold,double);
00073   vtkGetMacro(DiffusionThreshold,double);
00075   
00077 
00081   vtkSetMacro(DiffusionFactor,double);
00082   vtkGetMacro(DiffusionFactor,double);
00084 
00086 
00087   vtkSetMacro(Faces,int);
00088   vtkGetMacro(Faces,int);
00089   vtkBooleanMacro(Faces,int);
00090   vtkSetMacro(Edges,int);
00091   vtkGetMacro(Edges,int);
00092   vtkBooleanMacro(Edges,int);
00093   vtkSetMacro(Corners,int);
00094   vtkGetMacro(Corners,int);
00095   vtkBooleanMacro(Corners,int);
00097 
00099 
00101   vtkSetMacro(GradientMagnitudeThreshold,int);
00102   vtkGetMacro(GradientMagnitudeThreshold,int);
00103   vtkBooleanMacro(GradientMagnitudeThreshold,int);
00105   
00106 protected:
00107   vtkImageAnisotropicDiffusion2D();
00108   ~vtkImageAnisotropicDiffusion2D() {};
00109 
00110   int NumberOfIterations;
00111   double DiffusionThreshold;
00112   double DiffusionFactor;  
00113   // to determine which neighbors to diffuse
00114   int Faces;
00115   int Edges;
00116   int Corners;
00117   // What threshold to use
00118   int GradientMagnitudeThreshold;
00119   
00120   void ThreadedExecute(vtkImageData *inData, vtkImageData *outData, 
00121                        int extent[6], int id);
00122   void Iterate(vtkImageData *in, vtkImageData *out, 
00123                double ar0, double ar1, int *coreExtent, int count);
00124 private:
00125   vtkImageAnisotropicDiffusion2D(const vtkImageAnisotropicDiffusion2D&);  // Not implemented.
00126   void operator=(const vtkImageAnisotropicDiffusion2D&);  // Not implemented.
00127 };
00128 
00129 #endif
00130 
00131 
00132