VTK
dox/Imaging/General/vtkImageAnisotropicDiffusion3D.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkImageAnisotropicDiffusion3D.h
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 =========================================================================*/
00043 #ifndef __vtkImageAnisotropicDiffusion3D_h
00044 #define __vtkImageAnisotropicDiffusion3D_h
00045 
00046 
00047 #include "vtkImagingGeneralModule.h" // For export macro
00048 #include "vtkImageSpatialAlgorithm.h"
00049 
00050 class VTKIMAGINGGENERAL_EXPORT vtkImageAnisotropicDiffusion3D : public vtkImageSpatialAlgorithm
00051 {
00052 public:
00053   static vtkImageAnisotropicDiffusion3D *New();
00054   vtkTypeMacro(vtkImageAnisotropicDiffusion3D,vtkImageSpatialAlgorithm);
00055   void PrintSelf(ostream& os, vtkIndent indent);
00056 
00057 
00063   void SetNumberOfIterations(int num);
00064 
00066 
00067   vtkGetMacro(NumberOfIterations,int);
00069 
00071 
00076   vtkSetMacro(DiffusionThreshold,double);
00077   vtkGetMacro(DiffusionThreshold,double);
00079 
00081 
00082   vtkSetMacro(DiffusionFactor,double);
00083   vtkGetMacro(DiffusionFactor,double);
00085 
00087 
00088   vtkSetMacro(Faces,int);
00089   vtkGetMacro(Faces,int);
00090   vtkBooleanMacro(Faces,int);
00091   vtkSetMacro(Edges,int);
00092   vtkGetMacro(Edges,int);
00093   vtkBooleanMacro(Edges,int);
00094   vtkSetMacro(Corners,int);
00095   vtkGetMacro(Corners,int);
00096   vtkBooleanMacro(Corners,int);
00098 
00100 
00102   vtkSetMacro(GradientMagnitudeThreshold,int);
00103   vtkGetMacro(GradientMagnitudeThreshold,int);
00104   vtkBooleanMacro(GradientMagnitudeThreshold,int);
00106 
00107 protected:
00108   vtkImageAnisotropicDiffusion3D();
00109   ~vtkImageAnisotropicDiffusion3D() {}
00110 
00111   int NumberOfIterations;
00112   double DiffusionThreshold;
00113   double DiffusionFactor;
00114   // to determine which neighbors to diffuse
00115   int Faces;
00116   int Edges;
00117   int Corners;
00118   // What threshold to use
00119   int GradientMagnitudeThreshold;
00120 
00121   void ThreadedRequestData(vtkInformation *request,
00122                            vtkInformationVector **inputVector,
00123                            vtkInformationVector *outputVector,
00124                            vtkImageData ***inData, vtkImageData **outData,
00125                            int extent[6], int id);
00126   void Iterate(vtkImageData *in, vtkImageData *out,
00127                double ar0, double ar1, double ar3, int *coreExtent, int count);
00128 private:
00129   vtkImageAnisotropicDiffusion3D(const vtkImageAnisotropicDiffusion3D&);  // Not implemented.
00130   void operator=(const vtkImageAnisotropicDiffusion3D&);  // Not implemented.
00131 };
00132 
00133 #endif
00134 
00135 
00136