VTK  9.0.1
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 =========================================================================*/
23 #ifndef vtkImageGaussianSmooth_h
24 #define vtkImageGaussianSmooth_h
25 
26 #include "vtkImagingGeneralModule.h" // For export macro
28 
29 class VTKIMAGINGGENERAL_EXPORT vtkImageGaussianSmooth : public vtkThreadedImageAlgorithm
30 {
31 public:
33  void PrintSelf(ostream& os, vtkIndent indent) override;
34 
41 
43 
46  vtkSetVector3Macro(StandardDeviations, double);
47  void SetStandardDeviation(double std) { this->SetStandardDeviations(std, std, std); }
48  void SetStandardDeviations(double a, double b) { this->SetStandardDeviations(a, b, 0.0); }
49  vtkGetVector3Macro(StandardDeviations, double);
51 
56  void SetStandardDeviation(double a, double b) { this->SetStandardDeviations(a, b, 0.0); }
57  void SetStandardDeviation(double a, double b, double c) { this->SetStandardDeviations(a, b, c); }
58 
60 
65  vtkSetVector3Macro(RadiusFactors, double);
66  void SetRadiusFactors(double f, double f2) { this->SetRadiusFactors(f, f2, 1.5); }
67  void SetRadiusFactor(double f) { this->SetRadiusFactors(f, f, f); }
68  vtkGetVector3Macro(RadiusFactors, double);
70 
72 
76  vtkSetMacro(Dimensionality, int);
77  vtkGetMacro(Dimensionality, int);
79 
80 protected:
83 
85  double StandardDeviations[3];
86  double RadiusFactors[3];
87 
88  void ComputeKernel(double* kernel, int min, int max, double std);
90  void InternalRequestUpdateExtent(int*, int*);
91  void ExecuteAxis(int axis, vtkImageData* inData, int inExt[6], vtkImageData* outData,
92  int outExt[6], int* pcycle, int target, int* pcount, int total, vtkInformation* inInfo);
94  vtkInformationVector* outputVector, vtkImageData*** inData, vtkImageData** outData,
95  int outExt[6], int id) override;
96 
97 private:
99  void operator=(const vtkImageGaussianSmooth&) = delete;
100 };
101 
102 #endif
vtkImageGaussianSmooth::New
static vtkImageGaussianSmooth * New()
Creates an instance of vtkImageGaussianSmooth with the following defaults: Dimensionality 3,...
vtkImageGaussianSmooth::vtkImageGaussianSmooth
vtkImageGaussianSmooth()
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:36
vtkImageGaussianSmooth::ExecuteAxis
void ExecuteAxis(int axis, vtkImageData *inData, int inExt[6], vtkImageData *outData, int outExt[6], int *pcycle, int target, int *pcount, int total, vtkInformation *inInfo)
vtkThreadedImageAlgorithm
Generic filter that has one input.
Definition: vtkThreadedImageAlgorithm.h:38
vtkImageGaussianSmooth::InternalRequestUpdateExtent
void InternalRequestUpdateExtent(int *, int *)
vtkThreadedImageAlgorithm.h
vtkImageGaussianSmooth
Performs a gaussian convolution.
Definition: vtkImageGaussianSmooth.h:30
vtkImageGaussianSmooth::SetStandardDeviations
void SetStandardDeviations(double a, double b)
Definition: vtkImageGaussianSmooth.h:48
max
#define max(a, b)
Definition: vtkX3DExporterFIWriterHelper.h:31
target
boost::graph_traits< vtkGraph * >::vertex_descriptor target(boost::graph_traits< vtkGraph * >::edge_descriptor e, vtkGraph *)
Definition: vtkBoostGraphAdapter.h:965
vtkImageGaussianSmooth::SetStandardDeviation
void SetStandardDeviation(double a, double b, double c)
Definition: vtkImageGaussianSmooth.h:57
vtkImageGaussianSmooth::SetRadiusFactors
void SetRadiusFactors(double f, double f2)
Definition: vtkImageGaussianSmooth.h:66
vtkImageGaussianSmooth::SetStandardDeviation
void SetStandardDeviation(double std)
Definition: vtkImageGaussianSmooth.h:47
vtkImageGaussianSmooth::ThreadedRequestData
void ThreadedRequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector, vtkImageData ***inData, vtkImageData **outData, int outExt[6], int id) override
If the subclass does not define an Execute method, then the task will be broken up,...
vtkImageGaussianSmooth::RequestUpdateExtent
int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Subclasses can reimplement this method to translate the update extent requests from each output port ...
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkImageGaussianSmooth::SetStandardDeviation
void SetStandardDeviation(double a, double b)
Sets/Gets the Standard deviation of the gaussian in pixel units.
Definition: vtkImageGaussianSmooth.h:56
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:65
vtkImageGaussianSmooth::SetRadiusFactor
void SetRadiusFactor(double f)
Definition: vtkImageGaussianSmooth.h:67
vtkImageGaussianSmooth::ComputeKernel
void ComputeKernel(double *kernel, int min, int max, double std)
vtkImageGaussianSmooth::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageGaussianSmooth::~vtkImageGaussianSmooth
~vtkImageGaussianSmooth() override
vtkImageGaussianSmooth::Dimensionality
int Dimensionality
Definition: vtkImageGaussianSmooth.h:84