VTK
vtkImageGaussianSmooth.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageGaussianSmooth.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
29 #ifndef vtkImageGaussianSmooth_h
30 #define vtkImageGaussianSmooth_h
31 
32 
33 #include "vtkImagingGeneralModule.h" // For export macro
35 
36 class VTKIMAGINGGENERAL_EXPORT vtkImageGaussianSmooth : public vtkThreadedImageAlgorithm
37 {
38 public:
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41 
47  static vtkImageGaussianSmooth *New();
48 
49 
51 
54  vtkSetVector3Macro(StandardDeviations, double);
55  void SetStandardDeviation(double std)
56  {this->SetStandardDeviations(std,std,std);}
57  void SetStandardDeviations(double a,double b)
58  {this->SetStandardDeviations(a,b,0.0);}
59  vtkGetVector3Macro(StandardDeviations, double);
61 
66  void SetStandardDeviation(double a,double b)
67  {this->SetStandardDeviations(a,b,0.0);}
68  void SetStandardDeviation(double a,double b,double c)
69  {this->SetStandardDeviations(a,b,c);}
70 
72 
77  vtkSetVector3Macro(RadiusFactors, double);
78  void SetRadiusFactors(double f, double f2) {
79  this->SetRadiusFactors(f,f2,1.5);}
80  void SetRadiusFactor(double f) {this->SetRadiusFactors(f, f, f);}
81  vtkGetVector3Macro(RadiusFactors, double);
83 
85 
89  vtkSetMacro(Dimensionality, int);
90  vtkGetMacro(Dimensionality, int);
92 
93 protected:
95  ~vtkImageGaussianSmooth() override;
96 
98  double StandardDeviations[3];
99  double RadiusFactors[3];
100 
101  void ComputeKernel(double *kernel, int min, int max, double std);
103  void InternalRequestUpdateExtent(int *, int*);
104  void ExecuteAxis(int axis, vtkImageData *inData, int inExt[6],
105  vtkImageData *outData, int outExt[6],
106  int *pcycle, int target, int *pcount, int total,
107  vtkInformation *inInfo);
108  void ThreadedRequestData(vtkInformation *request,
109  vtkInformationVector **inputVector,
110  vtkInformationVector *outputVector,
111  vtkImageData ***inData, vtkImageData **outData,
112  int outExt[6], int id) override;
113 
114 private:
116  void operator=(const vtkImageGaussianSmooth&) = delete;
117 };
118 
119 #endif
120 
121 
122 
123 
124 
125 
126 
127 
128 
129 
vtkThreadedImageAlgorithm::ThreadedRequestData
virtual void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int extent[6], int threadId)
If the subclass does not define an Execute method, then the task will be broken up,...
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkThreadedImageAlgorithm
Generic filter that has one input.
Definition: vtkThreadedImageAlgorithm.h:43
vtkThreadedImageAlgorithm.h
vtkImageGaussianSmooth
Performs a gaussian convolution.
Definition: vtkImageGaussianSmooth.h:36
vtkImageGaussianSmooth::SetStandardDeviations
void SetStandardDeviations(double a, double b)
Definition: vtkImageGaussianSmooth.h:57
max
#define max(a, b)
Definition: vtkX3DExporterFIWriterHelper.h:31
vtkImageGaussianSmooth::SetStandardDeviation
void SetStandardDeviation(double a, double b, double c)
Definition: vtkImageGaussianSmooth.h:68
vtkImageAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to translate the update extent requests from each output port ...
vtkThreadedImageAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageGaussianSmooth::SetRadiusFactors
void SetRadiusFactors(double f, double f2)
Definition: vtkImageGaussianSmooth.h:78
vtkImageGaussianSmooth::SetStandardDeviation
void SetStandardDeviation(double std)
Definition: vtkImageGaussianSmooth.h:55
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkImageGaussianSmooth::SetStandardDeviation
void SetStandardDeviation(double a, double b)
Sets/Gets the Standard deviation of the gaussian in pixel units.
Definition: vtkImageGaussianSmooth.h:66
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkAlgorithm::New
static vtkAlgorithm * New()
vtkImageGaussianSmooth::SetRadiusFactor
void SetRadiusFactor(double f)
Definition: vtkImageGaussianSmooth.h:80
target
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:832
vtkImageGaussianSmooth::Dimensionality
int Dimensionality
Definition: vtkImageGaussianSmooth.h:97