Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound 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   Language:  C++
00006 
00007   Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 
00008   All rights reserved.
00009   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00010 
00011      This software is distributed WITHOUT ANY WARRANTY; without even 
00012      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00013      PURPOSE.  See the above copyright notice for more information.
00014 
00015 =========================================================================*/
00057 #ifndef __vtkImageAnisotropicDiffusion2D_h
00058 #define __vtkImageAnisotropicDiffusion2D_h
00059 
00060 
00061 #include "vtkImageSpatialFilter.h"
00062 class VTK_IMAGING_EXPORT vtkImageAnisotropicDiffusion2D : public vtkImageSpatialFilter
00063 {
00064 public:
00065   static vtkImageAnisotropicDiffusion2D *New();
00066   vtkTypeRevisionMacro(vtkImageAnisotropicDiffusion2D,vtkImageSpatialFilter);
00067   void PrintSelf(ostream& os, vtkIndent indent);
00068 
00074   void SetNumberOfIterations(int num);
00075 
00077 
00078   vtkGetMacro(NumberOfIterations,int);
00080 
00082 
00087   vtkSetMacro(DiffusionThreshold,float);
00088   vtkGetMacro(DiffusionThreshold,float);
00090   
00092 
00096   vtkSetMacro(DiffusionFactor,float);
00097   vtkGetMacro(DiffusionFactor,float);
00099 
00101 
00102   vtkSetMacro(Faces,int);
00103   vtkGetMacro(Faces,int);
00104   vtkBooleanMacro(Faces,int);
00105   vtkSetMacro(Edges,int);
00106   vtkGetMacro(Edges,int);
00107   vtkBooleanMacro(Edges,int);
00108   vtkSetMacro(Corners,int);
00109   vtkGetMacro(Corners,int);
00110   vtkBooleanMacro(Corners,int);
00112 
00114 
00116   vtkSetMacro(GradientMagnitudeThreshold,int);
00117   vtkGetMacro(GradientMagnitudeThreshold,int);
00118   vtkBooleanMacro(GradientMagnitudeThreshold,int);
00120   
00121 protected:
00122   vtkImageAnisotropicDiffusion2D();
00123   ~vtkImageAnisotropicDiffusion2D() {};
00124 
00125   int NumberOfIterations;
00126   float DiffusionThreshold;
00127   float DiffusionFactor;  
00128   // to determine which neighbors to diffuse
00129   int Faces;
00130   int Edges;
00131   int Corners;
00132   // What threshold to use
00133   int GradientMagnitudeThreshold;
00134   
00135   void ThreadedExecute(vtkImageData *inData, vtkImageData *outData, 
00136                        int extent[6], int id);
00137   void Iterate(vtkImageData *in, vtkImageData *out, 
00138                float ar0, float ar1, int *coreExtent, int count);
00139 private:
00140   vtkImageAnisotropicDiffusion2D(const vtkImageAnisotropicDiffusion2D&);  // Not implemented.
00141   void operator=(const vtkImageAnisotropicDiffusion2D&);  // Not implemented.
00142 };
00143 
00144 #endif
00145 
00146 
00147