ITK  5.2.0
Insight Toolkit
itkHessianToObjectnessMeasureImageFilter.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 itkHessianToObjectnessMeasureImageFilter_h
19 #define itkHessianToObjectnessMeasureImageFilter_h
20 
22 #include "itkImageToImageFilter.h"
23 
24 namespace itk
25 {
60 template <typename TInputImage, typename TOutputImage>
61 class ITK_TEMPLATE_EXPORT HessianToObjectnessMeasureImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
62 {
63 public:
64  ITK_DISALLOW_COPY_AND_ASSIGN(HessianToObjectnessMeasureImageFilter);
65 
71 
72  using InputImageType = typename Superclass::InputImageType;
73  using OutputImageType = typename Superclass::OutputImageType;
74  using InputPixelType = typename InputImageType::PixelType;
75  using OutputPixelType = typename OutputImageType::PixelType;
77 
79  static constexpr unsigned int ImageDimension = InputImageType ::ImageDimension;
80 
81  using EigenValueType = double;
83 
85  itkNewMacro(Self);
86 
89 
93  itkSetMacro(Alpha, double);
94  itkGetConstMacro(Alpha, double);
96 
100  itkSetMacro(Beta, double);
101  itkGetConstMacro(Beta, double);
103 
106  itkSetMacro(Gamma, double);
107  itkGetConstMacro(Gamma, double);
109 
112  itkSetMacro(ScaleObjectnessMeasure, bool);
113  itkGetConstMacro(ScaleObjectnessMeasure, bool);
114  itkBooleanMacro(ScaleObjectnessMeasure);
116 
120  itkSetMacro(ObjectDimension, unsigned int);
121  itkGetConstMacro(ObjectDimension, unsigned int);
123 
126  itkSetMacro(BrightObject, bool);
127  itkGetConstMacro(BrightObject, bool);
128  itkBooleanMacro(BrightObject);
130 
131 #ifdef ITK_USE_CONCEPT_CHECKING
132  // Begin concept checking
133  itkConceptMacro(DoubleConvertibleToOutputCheck, (Concept::Convertible<double, OutputPixelType>));
134  // End concept checking
135 #endif
136 
137 protected:
139  ~HessianToObjectnessMeasureImageFilter() override = default;
140  void
141  PrintSelf(std::ostream & os, Indent indent) const override;
142 
143  void
144  VerifyPreconditions() ITKv5_CONST override;
145 
146  void
147  DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
148 
149 
150 private:
151  // functor used to sort the eigenvalues are to be sorted
152  // |e1|<=|e2|<=...<=|eN|
153  //
154  // Returns ( abs(a) < abs(b) )
156  {
157  bool
159  {
160  return itk::Math::abs(a) < itk::Math::abs(b);
161  }
162  };
163 
164  double m_Alpha{ 0.5 };
165  double m_Beta{ 0.5 };
166  double m_Gamma{ 5.0 };
167  unsigned int m_ObjectDimension{ 1 };
168  bool m_BrightObject{ true };
169  bool m_ScaleObjectnessMeasure{ true };
170 };
171 } // end namespace itk
172 
173 #ifndef ITK_MANUAL_INSTANTIATION
174 # include "itkHessianToObjectnessMeasureImageFilter.hxx"
175 #endif
176 
177 #endif
itk::HessianToObjectnessMeasureImageFilter::AbsLessCompare
Definition: itkHessianToObjectnessMeasureImageFilter.h:155
itk::HessianToObjectnessMeasureImageFilter::OutputPixelType
typename OutputImageType::PixelType OutputPixelType
Definition: itkHessianToObjectnessMeasureImageFilter.h:75
itk::HessianToObjectnessMeasureImageFilter::InputPixelType
typename InputImageType::PixelType InputPixelType
Definition: itkHessianToObjectnessMeasureImageFilter.h:74
itk::HessianToObjectnessMeasureImageFilter::AbsLessCompare::operator()
bool operator()(EigenValueType a, EigenValueType b)
Definition: itkHessianToObjectnessMeasureImageFilter.h:158
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::HessianToObjectnessMeasureImageFilter::EigenValueType
double EigenValueType
Definition: itkHessianToObjectnessMeasureImageFilter.h:81
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
itkSymmetricSecondRankTensor.h
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itkImageToImageFilter.h
itk::FixedArray
Simulate a standard C array with copy semantics.
Definition: itkFixedArray.h:52
itk::ImageSource::OutputImageRegionType
typename OutputImageType::RegionType OutputImageRegionType
Definition: itkImageSource.h:92
itk::HessianToObjectnessMeasureImageFilter
A filter to enhance M-dimensional objects in N-dimensional images.
Definition: itkHessianToObjectnessMeasureImageFilter.h:61
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:64
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::Concept::Convertible
Definition: itkConceptChecking.h:214
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90