ITK  6.0.0
Insight Toolkit
itkDiscreteGaussianDerivativeImageFilter.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 itkDiscreteGaussianDerivativeImageFilter_h
19#define itkDiscreteGaussianDerivativeImageFilter_h
20
22#include "itkImage.h"
23
24namespace itk
25{
58template <typename TInputImage, typename TOutputImage>
59class ITK_TEMPLATE_EXPORT DiscreteGaussianDerivativeImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
60{
61public:
62 ITK_DISALLOW_COPY_AND_MOVE(DiscreteGaussianDerivativeImageFilter);
63
69
71 itkNewMacro(Self);
72
74 itkOverrideGetNameOfClassMacro(DiscreteGaussianDerivativeImageFilter);
75
77 using InputImageType = TInputImage;
78 using OutputImageType = TOutputImage;
79
82 using OutputPixelType = typename TOutputImage::PixelType;
83 using OutputInternalPixelType = typename TOutputImage::InternalPixelType;
84 using InputPixelType = typename TInputImage::PixelType;
85 using InputInternalPixelType = typename TInputImage::InternalPixelType;
86
89 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
90
93
96
100 itkSetMacro(Order, OrderArrayType);
101 itkGetConstMacro(Order, const OrderArrayType);
110 itkSetMacro(Variance, ArrayType);
111 itkGetConstMacro(Variance, const ArrayType);
117 itkSetMacro(MaximumError, ArrayType);
118 itkGetConstMacro(MaximumError, const ArrayType);
123 itkGetConstMacro(MaximumKernelWidth, int);
124 itkSetMacro(MaximumKernelWidth, int);
136 itkSetMacro(InternalNumberOfStreamDivisions, unsigned int);
137 itkGetConstMacro(InternalNumberOfStreamDivisions, unsigned int);
138
143 void
145 {
146 auto a = MakeFilled<OrderArrayType>(v);
147 this->SetOrder(a);
148 }
151 void
153 {
154 auto a = MakeFilled<ArrayType>(v);
155 this->SetVariance(a);
156 }
157
158 void
160 {
161 auto a = MakeFilled<ArrayType>(v);
162 this->SetMaximumError(a);
163 }
164
169 itkSetMacro(UseImageSpacing, bool);
170 itkGetConstMacro(UseImageSpacing, bool);
171 itkBooleanMacro(UseImageSpacing);
177 itkSetMacro(NormalizeAcrossScale, bool);
178 itkGetConstMacro(NormalizeAcrossScale, bool);
179 itkBooleanMacro(NormalizeAcrossScale);
182#ifdef ITK_USE_CONCEPT_CHECKING
183 // Begin concept checking
184 itkConceptMacro(OutputHasNumericTraitsCheck, (Concept::HasNumericTraits<OutputPixelType>));
185 // End concept checking
186#endif
187
188protected:
190 {
191 m_Order.Fill(1);
192 m_Variance.Fill(0.0);
193 m_MaximumError.Fill(0.01);
194 m_MaximumKernelWidth = 32;
195 m_UseImageSpacing = true;
196 m_NormalizeAcrossScale = false;
197 m_InternalNumberOfStreamDivisions = ImageDimension * ImageDimension;
198 }
199
201 void
202 PrintSelf(std::ostream & os, Indent indent) const override;
203
210 void
212
218 void
219 GenerateData() override;
220
221private:
223 OrderArrayType m_Order{};
224
227 ArrayType m_Variance{};
228
232 ArrayType m_MaximumError{};
233
236 int m_MaximumKernelWidth{};
237
239 bool m_UseImageSpacing{};
240
242 bool m_NormalizeAcrossScale{};
243
246 unsigned int m_InternalNumberOfStreamDivisions{};
247};
248} // end namespace itk
249
250#ifndef ITK_MANUAL_INSTANTIATION
251# include "itkDiscreteGaussianDerivativeImageFilter.hxx"
252#endif
253
254#endif
Calculates image derivatives using discrete derivative gaussian kernels. This filter calculates Gauss...
typename TInputImage::InternalPixelType InputInternalPixelType
void SetOrder(const typename OrderArrayType::ValueType v)
void PrintSelf(std::ostream &os, Indent indent) const override
typename TOutputImage::InternalPixelType OutputInternalPixelType
~DiscreteGaussianDerivativeImageFilter() override=default
void SetMaximumError(const typename ArrayType::ValueType v)
Base class for all process objects that output image data.
TOutputImage OutputImageType
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:50
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....