ITK  5.4.0
Insight Toolkit
itkMultiScaleHessianBasedMeasureImageFilter.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 itkMultiScaleHessianBasedMeasureImageFilter_h
19#define itkMultiScaleHessianBasedMeasureImageFilter_h
20
23#include "ITKImageFeatureExport.h"
24
25namespace itk
26{
32{
33public:
39 enum class SigmaStepMethod : uint8_t
40 {
41 EquispacedSigmaSteps = 0,
42 LogarithmicSigmaSteps = 1
43 };
44};
45// Define how to print enumeration
46extern ITKImageFeature_EXPORT std::ostream &
48
86template <typename TInputImage, typename THessianImage, typename TOutputImage = TInputImage>
88 : public ImageToImageFilter<TInputImage, TOutputImage>
89{
90public:
91 ITK_DISALLOW_COPY_AND_MOVE(MultiScaleHessianBasedMeasureImageFilter);
92
96
99
100 using InputImageType = TInputImage;
101 using OutputImageType = TOutputImage;
102 using HessianImageType = THessianImage;
103
105
106 using InputPixelType = typename TInputImage::PixelType;
107 using OutputPixelType = typename TOutputImage::PixelType;
109
111 static constexpr unsigned int ImageDimension = InputImageType::ImageDimension;
112
114 using ScalesPixelType = float;
116
119
125
126 using typename Superclass::DataObjectPointer;
127
129 itkNewMacro(Self);
130
132 itkOverrideGetNameOfClassMacro(MultiScaleHessianBasedMeasureImageFilter);
133
135 itkSetMacro(SigmaMinimum, double);
136 itkGetConstMacro(SigmaMinimum, double);
140 itkSetMacro(SigmaMaximum, double);
141 itkGetConstMacro(SigmaMaximum, double);
145 itkSetMacro(NumberOfSigmaSteps, unsigned int);
146 itkGetConstMacro(NumberOfSigmaSteps, unsigned int);
152 itkSetObjectMacro(HessianToMeasureFilter, HessianToMeasureFilterType);
153 itkGetModifiableObjectMacro(HessianToMeasureFilter, HessianToMeasureFilterType);
162 itkSetMacro(NonNegativeHessianBasedMeasure, bool);
163 itkGetConstMacro(NonNegativeHessianBasedMeasure, bool);
164 itkBooleanMacro(NonNegativeHessianBasedMeasure);
168#if !defined(ITK_LEGACY_REMOVE)
170 static constexpr SigmaStepMethodEnum EquispacedSigmaSteps = SigmaStepMethodEnum::EquispacedSigmaSteps;
171 static constexpr SigmaStepMethodEnum LogarithmicSigmaSteps = SigmaStepMethodEnum::LogarithmicSigmaSteps;
172#endif
173
181 void
183
185 void
187
190 const HessianImageType *
192
195 const ScalesImageType *
197
200 itkSetMacro(GenerateScalesOutput, bool);
201 itkGetConstMacro(GenerateScalesOutput, bool);
202 itkBooleanMacro(GenerateScalesOutput);
207 itkSetMacro(GenerateHessianOutput, bool);
208 itkGetConstMacro(GenerateHessianOutput, bool);
209 itkBooleanMacro(GenerateHessianOutput);
214
215protected:
218 void
219 PrintSelf(std::ostream & os, Indent indent) const override;
220
222 void
223 GenerateData() override;
224
225 void
227
228 using Superclass::MakeOutput;
231
232private:
233 void
235
236 double
237 ComputeSigmaValue(int scaleLevel);
238
239 void
241
242 bool m_NonNegativeHessianBasedMeasure{};
243
244 double m_SigmaMinimum{};
245 double m_SigmaMaximum{};
246
247 unsigned int m_NumberOfSigmaSteps{};
248 SigmaStepMethodEnum m_SigmaStepMethod{};
249
250 typename HessianToMeasureFilterType::Pointer m_HessianToMeasureFilter{};
251
252 typename HessianFilterType::Pointer m_HessianFilter{};
253
254 typename UpdateBufferType::Pointer m_UpdateBuffer{};
255
256 bool m_GenerateScalesOutput{};
257 bool m_GenerateHessianOutput{};
258};
259} // end namespace itk
260
261#ifndef ITK_MANUAL_INSTANTIATION
262# include "itkMultiScaleHessianBasedMeasureImageFilter.hxx"
263#endif
264
265#endif
Base class for all data objects in ITK.
Computes the Hessian matrix of an image by convolution with the Second and Cross derivatives of a Gau...
Base class for filters that take an image as input and produce an image as output.
Templated n-dimensional image class.
Definition: itkImage.h:89
TPixel ValueType
Definition: itkImage.h:111
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Light weight base class for most itk classes.
This class contains all enum classes used by MultiScaleHessianBasedMeasureImageFilter class.
A filter to enhance structures using Hessian eigensystem-based measures in a multiscale framework.
void EnlargeOutputRequestedRegion(DataObject *) override
const ScalesImageType * GetScalesOutput() const
~MultiScaleHessianBasedMeasureImageFilter() override=default
const HessianImageType * GetHessianOutput() const
void PrintSelf(std::ostream &os, Indent indent) const override
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override
Make a DataObject of the correct type to used as the specified output.
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
Definition: itkArray.h:216