VTK  9.3.1
vtkImageGaussianSmooth.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
17 #ifndef vtkImageGaussianSmooth_h
18 #define vtkImageGaussianSmooth_h
19 
20 #include "vtkImagingGeneralModule.h" // For export macro
22 
23 VTK_ABI_NAMESPACE_BEGIN
24 class VTKIMAGINGGENERAL_EXPORT vtkImageGaussianSmooth : public vtkThreadedImageAlgorithm
25 {
26 public:
28  void PrintSelf(ostream& os, vtkIndent indent) override;
29 
35  static vtkImageGaussianSmooth* New();
36 
38 
41  vtkSetVector3Macro(StandardDeviations, double);
42  void SetStandardDeviation(double std) { this->SetStandardDeviations(std, std, std); }
43  void SetStandardDeviations(double a, double b) { this->SetStandardDeviations(a, b, 0.0); }
44  vtkGetVector3Macro(StandardDeviations, double);
46 
51  void SetStandardDeviation(double a, double b) { this->SetStandardDeviations(a, b, 0.0); }
52  void SetStandardDeviation(double a, double b, double c) { this->SetStandardDeviations(a, b, c); }
53 
55 
60  vtkSetVector3Macro(RadiusFactors, double);
61  void SetRadiusFactors(double f, double f2) { this->SetRadiusFactors(f, f2, 1.5); }
62  void SetRadiusFactor(double f) { this->SetRadiusFactors(f, f, f); }
63  vtkGetVector3Macro(RadiusFactors, double);
65 
67 
71  vtkSetMacro(Dimensionality, int);
72  vtkGetMacro(Dimensionality, int);
74 
75 protected:
77  ~vtkImageGaussianSmooth() override;
78 
80  double StandardDeviations[3];
81  double RadiusFactors[3];
82 
83  void ComputeKernel(double* kernel, int min, int max, double std);
85  void InternalRequestUpdateExtent(int*, int*);
86  void ExecuteAxis(int axis, vtkImageData* inData, int inExt[6], vtkImageData* outData,
87  int outExt[6], int* pcycle, int target, int* pcount, int total, vtkInformation* inInfo);
88  void ThreadedRequestData(vtkInformation* request, vtkInformationVector** inputVector,
89  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
90  int outExt[6], int id) override;
91 
92 private:
94  void operator=(const vtkImageGaussianSmooth&) = delete;
95 };
96 
97 VTK_ABI_NAMESPACE_END
98 #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:28
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:42
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)