ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkDiscreteHessianGaussianImageFunction.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 itkDiscreteHessianGaussianImageFunction_h
19#define itkDiscreteHessianGaussianImageFunction_h
20
24
25namespace itk
26{
45template <typename TInputImage, typename TOutput = double>
46class ITK_TEMPLATE_EXPORT DiscreteHessianGaussianImageFunction
47 : public ImageFunction<TInputImage, SymmetricSecondRankTensor<TOutput, TInputImage::ImageDimension>, TOutput>
48{
49public:
50
53
55 using Superclass =
57
61
63 itkNewMacro(Self);
64
66 itkOverrideGetNameOfClassMacro(DiscreteHessianGaussianImageFunction);
67
69 using typename Superclass::InputImageType;
70 using typename Superclass::InputPixelType;
71 using typename Superclass::IndexType;
72 using typename Superclass::IndexValueType;
74 using typename Superclass::PointType;
75
77 static constexpr unsigned int ImageDimension2 = InputImageType::ImageDimension;
78
81 using typename Superclass::OutputType;
82
84
86
90
92
96
101
103#if !defined(ITK_LEGACY_REMOVE)
105 static constexpr InterpolationModeEnum NearestNeighbourInterpolation =
106 InterpolationModeEnum::NearestNeighbourInterpolation;
107 static constexpr InterpolationModeEnum LinearInterpolation = InterpolationModeEnum::LinearInterpolation;
108#endif
109
110public:
113 Evaluate(const PointType & point) const override;
114
117 EvaluateAtIndex(const IndexType & index) const override;
118
121 EvaluateAtContinuousIndex(const ContinuousIndexType & index) const override;
122
127 itkSetMacro(Variance, VarianceArrayType);
128 itkGetConstMacro(Variance, const VarianceArrayType);
129 itkSetVectorMacro(Variance, double, VarianceArrayType::Length);
131
133 virtual void
134 SetVariance(double variance)
135 {
136 m_Variance.Fill(variance);
137 this->Modified();
138 }
139
140
143 void
144 SetSigma(const double sigma)
145 {
146 SetVariance(sigma * sigma);
147 }
148
154 itkSetClampMacro(MaximumError, double, 0.00001, 0.99999);
155 itkGetConstMacro(MaximumError, double);
157
161 itkSetMacro(NormalizeAcrossScale, bool);
162 itkGetConstMacro(NormalizeAcrossScale, bool);
163 itkBooleanMacro(NormalizeAcrossScale);
165
167 itkSetMacro(UseImageSpacing, bool);
168 itkGetConstMacro(UseImageSpacing, bool);
169 itkBooleanMacro(UseImageSpacing);
171
176 itkSetMacro(MaximumKernelWidth, unsigned int);
177 itkGetConstMacro(MaximumKernelWidth, unsigned int);
179
181 itkSetEnumMacro(InterpolationMode, InterpolationModeEnum);
182 itkGetEnumMacro(InterpolationMode, InterpolationModeEnum);
184
189 void
190 SetInputImage(const InputImageType * ptr) override;
191
194 virtual void
199
200protected:
203
205
206 void
208 {}
209 void
210 PrintSelf(std::ostream & os, Indent indent) const override;
211
212 void
214
215private:
218
221 double m_MaximumError{ 0.005 };
222
226 unsigned int m_MaximumKernelWidth{ 30 };
227
233
238
241
244
246 bool m_UseImageSpacing{ true };
247
249 InterpolationModeEnum m_InterpolationMode{ InterpolationModeEnum::NearestNeighbourInterpolation };
250};
251} // namespace itk
252
253#ifndef ITK_MANUAL_INSTANTIATION
254# include "itkDiscreteHessianGaussianImageFunction.hxx"
255#endif
256
257#endif
typename OperatorImageFunctionType::Pointer OperatorImageFunctionPointer
Neighborhood< TOutput, Self::ImageDimension2 > KernelType
~DiscreteHessianGaussianImageFunction() override=default
FixedArray< KernelType, Self::ImageDimension2 *(Self::ImageDimension2+1)/2 > KernelArrayType
SymmetricSecondRankTensor< TOutput, TInputImage::ImageDimension > TensorType
FixedArray< GaussianDerivativeOperatorType, 3 *Self::ImageDimension2 > GaussianDerivativeOperatorArrayType
void PrintSelf(std::ostream &os, Indent indent) const override
OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const override
itk::GaussianDerivativeOperator< TOutput, Self::ImageDimension2 > GaussianDerivativeOperatorType
void SetInputImage(const InputImageType *ptr) override
FixedArray< double, Self::ImageDimension2 > VarianceArrayType
NeighborhoodOperatorImageFunction< InputImageType, TOutput > OperatorImageFunctionType
virtual void SetVariance(VarianceArrayType _arg)
OutputType EvaluateAtIndex(const IndexType &index) const override
OutputType Evaluate(const PointType &point) const override
itk::GaussianDerivativeOperatorEnums::InterpolationMode InterpolationModeEnum
ImageFunction< TInputImage, SymmetricSecondRankTensor< TOutput, TInputImage::ImageDimension >, TOutput > Superclass
Simulate a standard C array with copy semantics.
A NeighborhoodOperator whose coefficients are a one dimensional, discrete derivative Gaussian kernel.
Control indentation during Print() invocation.
Definition itkIndent.h:50
Compute the convolution of a neighborhood operator with the image at a specific location in space,...
A light-weight container object for storing an N-dimensional neighborhood of values.
virtual void Modified() const
Implements transparent reference counting.
Represent a symmetric tensor of second rank.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
*par Constraints *The filter image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents