ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkRecursiveGaussianImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkRecursiveGaussianImageFilter_h
19#define itkRecursiveGaussianImageFilter_h
20
22#include "ITKSmoothingExport.h"
23
24namespace itk
25{
31{
32public:
38 enum class GaussianOrder : uint8_t
39 {
43 };
44};
45// Define how to print enumeration
46extern ITKSmoothing_EXPORT std::ostream &
47 operator<<(std::ostream & out, const RecursiveGaussianImageFilterEnums::GaussianOrder value);
48
50#if !defined(ITK_LEGACY_REMOVE)
52using OrderEnumType = GaussianOrderEnum;
53using EnumGaussianOrderType = GaussianOrderEnum;
54// We need to expose the enum values at the class level
55// for backwards compatibility
56static constexpr GaussianOrderEnum ZeroOrder = GaussianOrderEnum::ZeroOrder;
57static constexpr GaussianOrderEnum FirstOrder = GaussianOrderEnum::FirstOrder;
58static constexpr GaussianOrderEnum SecondOrder = GaussianOrderEnum::SecondOrder;
59#endif
60
94template <typename TInputImage, typename TOutputImage = TInputImage>
95class ITK_TEMPLATE_EXPORT RecursiveGaussianImageFilter : public RecursiveSeparableImageFilter<TInputImage, TOutputImage>
96{
97public:
98 ITK_DISALLOW_COPY_AND_MOVE(RecursiveGaussianImageFilter);
99
105
106 using typename Superclass::RealType;
107 using typename Superclass::ScalarRealType;
108
110 itkNewMacro(Self);
111
113 itkOverrideGetNameOfClassMacro(RecursiveGaussianImageFilter);
114
120 itkGetConstMacro(Sigma, ScalarRealType);
121 itkSetMacro(Sigma, ScalarRealType);
124 using OutputImageType = TOutputImage;
125
126#if !defined(ITK_LEGACY_REMOVE)
128 using OrderEnumType = GaussianOrderEnum;
129 using EnumGaussianOrderType = GaussianOrderEnum;
130 // We need to expose the enum values at the class level
131 // for backwards compatibility
132 static constexpr GaussianOrderEnum ZeroOrder = GaussianOrderEnum::ZeroOrder;
133 static constexpr GaussianOrderEnum FirstOrder = GaussianOrderEnum::FirstOrder;
134 static constexpr GaussianOrderEnum SecondOrder = GaussianOrderEnum::SecondOrder;
135#endif
136
176 itkSetMacro(NormalizeAcrossScale, bool);
177 itkGetConstMacro(NormalizeAcrossScale, bool);
178 itkBooleanMacro(NormalizeAcrossScale);
179
187 itkSetMacro(Order, GaussianOrderEnum);
188 itkGetConstMacro(Order, GaussianOrderEnum);
191 void
193
195 void
197
199 void
201
202protected:
204 ~RecursiveGaussianImageFilter() override = default;
205 void
206 PrintSelf(std::ostream & os, Indent indent) const override;
207
212 void
213 SetUp(ScalarRealType spacing) override;
214
215 /* See superclass for doxygen. This method adds the additional check
216 * that sigma is greater than zero. */
217 void
218 VerifyPreconditions() const override;
219
220private:
222 void
232 ScalarRealType & N0,
233 ScalarRealType & N1,
234 ScalarRealType & N2,
235 ScalarRealType & N3,
236 ScalarRealType & SN,
237 ScalarRealType & DN,
238 ScalarRealType & EN);
239
241 void
247 ScalarRealType & SD,
248 ScalarRealType & DD,
249 ScalarRealType & ED);
250
253 void
255
258
261
263};
264} // end namespace itk
265
266#ifndef ITK_MANUAL_INSTANTIATION
267# include "itkRecursiveGaussianImageFilter.hxx"
268#endif
269
270#endif
Control indentation during Print() invocation.
Definition itkIndent.h:50
Contains all enum classes used by RecursiveGaussianImageFilter class.
void SetUp(ScalarRealType spacing) override
RecursiveSeparableImageFilter< TInputImage, TOutputImage > Superclass
~RecursiveGaussianImageFilter() override=default
void PrintSelf(std::ostream &os, Indent indent) const override
void ComputeNCoefficients(ScalarRealType sigmad, ScalarRealType A1, ScalarRealType B1, ScalarRealType W1, ScalarRealType L1, ScalarRealType A2, ScalarRealType B2, ScalarRealType W2, ScalarRealType L2, ScalarRealType &N0, ScalarRealType &N1, ScalarRealType &N2, ScalarRealType &N3, ScalarRealType &SN, ScalarRealType &DN, ScalarRealType &EN)
void ComputeDCoefficients(ScalarRealType sigmad, ScalarRealType W1, ScalarRealType L1, ScalarRealType W2, ScalarRealType L2, ScalarRealType &SD, ScalarRealType &DD, ScalarRealType &ED)
void ComputeRemainingCoefficients(bool symmetric)
void VerifyPreconditions() const override
Verifies that the process object has been configured correctly, that all required inputs are set,...
typename NumericTraits< InputPixelType >::ScalarRealType ScalarRealType
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
ITKCommon_EXPORT std::ostream & operator<<(std::ostream &out, typename AnatomicalOrientation::CoordinateEnum value)
RecursiveGaussianImageFilterEnums::GaussianOrder GaussianOrderEnum