ITK  5.2.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  * http://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 
21 #include "itkImageToImageFilter.h"
23 #include "ITKImageFeatureExport.h"
24 
25 namespace itk
26 {
32 {
33 public:
39  enum class SigmaStepMethod : uint8_t
40  {
43  };
44 };
45 // Define how to print enumeration
46 extern ITKImageFeature_EXPORT std::ostream &
48 
87 template <typename TInputImage, typename THessianImage, typename TOutputImage = TInputImage>
89  : public ImageToImageFilter<TInputImage, TOutputImage>
90 {
91 public:
92  ITK_DISALLOW_COPY_AND_ASSIGN(MultiScaleHessianBasedMeasureImageFilter);
93 
97 
100 
101  using InputImageType = TInputImage;
102  using OutputImageType = TOutputImage;
103  using HessianImageType = THessianImage;
104 
106 
107  using InputPixelType = typename TInputImage::PixelType;
108  using OutputPixelType = typename TOutputImage::PixelType;
110 
112  static constexpr unsigned int ImageDimension = InputImageType ::ImageDimension;
113 
115  using ScalesPixelType = float;
117 
120 
126 
128 
130  itkNewMacro(Self);
131 
134 
136  itkSetMacro(SigmaMinimum, double);
137  itkGetConstMacro(SigmaMinimum, double);
139 
141  itkSetMacro(SigmaMaximum, double);
142  itkGetConstMacro(SigmaMaximum, double);
144 
146  itkSetMacro(NumberOfSigmaSteps, unsigned int);
147  itkGetConstMacro(NumberOfSigmaSteps, unsigned int);
149 
153  itkSetObjectMacro(HessianToMeasureFilter, HessianToMeasureFilterType);
154  itkGetModifiableObjectMacro(HessianToMeasureFilter, HessianToMeasureFilterType);
156 
163  itkSetMacro(NonNegativeHessianBasedMeasure, bool);
164  itkGetConstMacro(NonNegativeHessianBasedMeasure, bool);
165  itkBooleanMacro(NonNegativeHessianBasedMeasure);
167 
169 #if !defined(ITK_LEGACY_REMOVE)
170 
171  static constexpr SigmaStepMethodEnum EquispacedSigmaSteps = SigmaStepMethodEnum::EquispacedSigmaSteps;
172  static constexpr SigmaStepMethodEnum LogarithmicSigmaSteps = SigmaStepMethodEnum::LogarithmicSigmaSteps;
173 #endif
174 
177  itkSetEnumMacro(SigmaStepMethod, SigmaStepMethodEnum);
178  itkGetConstMacro(SigmaStepMethod, SigmaStepMethodEnum);
180 
182  void
183  SetSigmaStepMethodToEquispaced();
184 
186  void
187  SetSigmaStepMethodToLogarithmic();
188 
191  const HessianImageType *
192  GetHessianOutput() const;
193 
196  const ScalesImageType *
197  GetScalesOutput() const;
198 
201  itkSetMacro(GenerateScalesOutput, bool);
202  itkGetConstMacro(GenerateScalesOutput, bool);
203  itkBooleanMacro(GenerateScalesOutput);
205 
208  itkSetMacro(GenerateHessianOutput, bool);
209  itkGetConstMacro(GenerateHessianOutput, bool);
210  itkBooleanMacro(GenerateHessianOutput);
212 
215 
216 protected:
218  ~MultiScaleHessianBasedMeasureImageFilter() override = default;
219  void
220  PrintSelf(std::ostream & os, Indent indent) const override;
221 
223  void
224  GenerateData() override;
225 
226  void
227  EnlargeOutputRequestedRegion(DataObject *) override;
228 
229  using Superclass::MakeOutput;
231  MakeOutput(DataObjectPointerArraySizeType idx) override;
232 
233 private:
234  void
235  UpdateMaximumResponse(double sigma);
236 
237  double
238  ComputeSigmaValue(int scaleLevel);
239 
240  void
241  AllocateUpdateBuffer();
242 
244 
247 
248  unsigned int m_NumberOfSigmaSteps;
250 
252 
254 
256 
259 };
260 } // end namespace itk
261 
262 #ifndef ITK_MANUAL_INSTANTIATION
263 # include "itkMultiScaleHessianBasedMeasureImageFilter.hxx"
264 #endif
265 
266 #endif
itk::uint8_t
::uint8_t uint8_t
Definition: itkIntTypes.h:29
itk::operator<<
std::ostream & operator<<(std::ostream &os, const Array< TValue > &arr)
Definition: itkArray.h:213
itk::MultiScaleHessianBasedMeasureImageFilterEnums::SigmaStepMethod::EquispacedSigmaSteps
itk::MultiScaleHessianBasedMeasureImageFilter::m_HessianToMeasureFilter
HessianToMeasureFilterType::Pointer m_HessianToMeasureFilter
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:251
itk::MultiScaleHessianBasedMeasureImageFilter::m_GenerateScalesOutput
bool m_GenerateScalesOutput
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:257
itk::MultiScaleHessianBasedMeasureImageFilterEnums
This class contains all enum classes used by MultiScaleHessianBasedMeasureImageFilter class.
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:31
itk::MultiScaleHessianBasedMeasureImageFilter::OutputRegionType
typename TOutputImage::RegionType OutputRegionType
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:109
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itkHessianRecursiveGaussianImageFilter.h
itk::ProcessObject::DataObjectPointerArraySizeType
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
Definition: itkProcessObject.h:193
itk::MultiScaleHessianBasedMeasureImageFilter::m_NonNegativeHessianBasedMeasure
bool m_NonNegativeHessianBasedMeasure
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:243
itk::MultiScaleHessianBasedMeasureImageFilter::m_NumberOfSigmaSteps
unsigned int m_NumberOfSigmaSteps
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:248
itk::MultiScaleHessianBasedMeasureImageFilter::m_SigmaMinimum
double m_SigmaMinimum
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:245
itk::ImageToImageFilter
Base class for filters that take an image as input and produce an image as output.
Definition: itkImageToImageFilter.h:108
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::MultiScaleHessianBasedMeasureImageFilter::HessianImageType
THessianImage HessianImageType
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:103
itk::Image::ValueType
TPixel ValueType
Definition: itkImage.h:109
itk::MultiScaleHessianBasedMeasureImageFilter::m_HessianFilter
HessianFilterType::Pointer m_HessianFilter
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:253
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::MultiScaleHessianBasedMeasureImageFilter::ScalesPixelType
float ScalesPixelType
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:115
itk::MultiScaleHessianBasedMeasureImageFilterEnums::SigmaStepMethod
SigmaStepMethod
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:39
itk::MultiScaleHessianBasedMeasureImageFilter
A filter to enhance structures using Hessian eigensystem-based measures in a multiscale framework.
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:88
itk::MultiScaleHessianBasedMeasureImageFilterEnums::SigmaStepMethod::LogarithmicSigmaSteps
itk::MultiScaleHessianBasedMeasureImageFilter::InputPixelType
typename TInputImage::PixelType InputPixelType
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:107
itk::MultiScaleHessianBasedMeasureImageFilter::OutputPixelType
typename TOutputImage::PixelType OutputPixelType
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:108
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itkImageToImageFilter.h
itk::MultiScaleHessianBasedMeasureImageFilter::m_UpdateBuffer
UpdateBufferType::Pointer m_UpdateBuffer
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:255
itk::HessianRecursiveGaussianImageFilter
Computes the Hessian matrix of an image by convolution with the Second and Cross derivatives of a Gau...
Definition: itkHessianRecursiveGaussianImageFilter.h:47
itk::ImageSource::DataObjectPointerArraySizeType
Superclass::DataObjectPointerArraySizeType DataObjectPointerArraySizeType
Definition: itkImageSource.h:84
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::MultiScaleHessianBasedMeasureImageFilter::m_SigmaStepMethod
SigmaStepMethodEnum m_SigmaStepMethod
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:249
SigmaStepMethod
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:86
itk::MultiScaleHessianBasedMeasureImageFilter::m_SigmaMaximum
double m_SigmaMaximum
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:246
itk::MultiScaleHessianBasedMeasureImageFilter::BufferValueType
typename UpdateBufferType::ValueType BufferValueType
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:125
itk::MultiScaleHessianBasedMeasureImageFilter::m_GenerateHessianOutput
bool m_GenerateHessianOutput
Definition: itkMultiScaleHessianBasedMeasureImageFilter.h:258
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itk::DataObject
Base class for all data objects in ITK.
Definition: itkDataObject.h:293