VTK  9.2.6
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 #include "vtkImagingGeneralModule.h" // For export macro
34 
35 class VTKIMAGINGGENERAL_EXPORT vtkImageGaussianSmooth : public vtkThreadedImageAlgorithm
36 {
37 public:
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40 
46  static vtkImageGaussianSmooth* New();
47 
49 
52  vtkSetVector3Macro(StandardDeviations, double);
53  void SetStandardDeviation(double std) { this->SetStandardDeviations(std, std, std); }
54  void SetStandardDeviations(double a, double b) { this->SetStandardDeviations(a, b, 0.0); }
55  vtkGetVector3Macro(StandardDeviations, double);
57 
62  void SetStandardDeviation(double a, double b) { this->SetStandardDeviations(a, b, 0.0); }
63  void SetStandardDeviation(double a, double b, double c) { this->SetStandardDeviations(a, b, c); }
64 
66 
71  vtkSetVector3Macro(RadiusFactors, double);
72  void SetRadiusFactors(double f, double f2) { this->SetRadiusFactors(f, f2, 1.5); }
73  void SetRadiusFactor(double f) { this->SetRadiusFactors(f, f, f); }
74  vtkGetVector3Macro(RadiusFactors, double);
76 
78 
82  vtkSetMacro(Dimensionality, int);
83  vtkGetMacro(Dimensionality, int);
85 
86 protected:
88  ~vtkImageGaussianSmooth() override;
89 
91  double StandardDeviations[3];
92  double RadiusFactors[3];
93 
94  void ComputeKernel(double* kernel, int min, int max, double std);
96  void InternalRequestUpdateExtent(int*, int*);
97  void ExecuteAxis(int axis, vtkImageData* inData, int inExt[6], vtkImageData* outData,
98  int outExt[6], int* pcycle, int target, int* pcount, int total, vtkInformation* inInfo);
99  void ThreadedRequestData(vtkInformation* request, vtkInformationVector** inputVector,
100  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
101  int outExt[6], int id) override;
102 
103 private:
105  void operator=(const vtkImageGaussianSmooth&) = delete;
106 };
107 
108 #endif
void SetStandardDeviations(double a, double b)
Sets/Gets the Standard deviation of the gaussian in pixel units.
void SetStandardDeviation(double a, double b, double c)
Store vtkAlgorithm input/output information.
void SetRadiusFactors(double f, double f2)
Sets/Gets the Radius Factors of the gaussian (no unit).
void SetStandardDeviation(double std)
Sets/Gets the Standard deviation of the gaussian in pixel units.
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Subclasses can reimplement this method to translate the update extent requests from each output port ...
Performs a gaussian convolution.
Generic filter that has one input.
void SetRadiusFactor(double f)
Sets/Gets the Radius Factors of the gaussian (no unit).
a simple class to control print indentation
Definition: vtkIndent.h:39
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
topologically and geometrically regular array of data
Definition: vtkImageData.h:53
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, multiple threads will be spawned, and each thread will call this method.
Store zero or more vtkInformation instances.
static vtkAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetStandardDeviation(double a, double b)
Sets/Gets the Standard deviation of the gaussian in pixel units.
#define max(a, b)