ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkHessianToObjectnessMeasureImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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 {
59 template< typename TInputImage, typename TOutputImage >
60 class ITK_TEMPLATE_EXPORT HessianToObjectnessMeasureImageFilter:public
61  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 PrintSelf(std::ostream & os, Indent indent) const override;
141 
142  void VerifyPreconditions() ITKv5_CONST override;
143 
144  void DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
145 
146 
147 private:
148  // functor used to sort the eigenvalues are to be sorted
149  // |e1|<=|e2|<=...<=|eN|
150  //
151  // Returns ( abs(a) <= abs(b) )
154  {
155  return itk::Math::abs(a) <= itk::Math::abs(b);
156  }
157  };
158 
159  double m_Alpha{0.5};
160  double m_Beta{0.5};
161  double m_Gamma{5.0};
162  unsigned int m_ObjectDimension{1};
163  bool m_BrightObject{true};
164  bool m_ScaleObjectnessMeasure{true};
165 };
166 } // end namespace itk
167 
168 #ifndef ITK_MANUAL_INSTANTIATION
169 #include "itkHessianToObjectnessMeasureImageFilter.hxx"
170 #endif
171 
172 #endif
A filter to enhance M-dimensional objects in N-dimensional images.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
Simulate a standard C array with copy semnatics.
Definition: itkFixedArray.h:51
typename OutputImageType::RegionType OutputImageRegionType
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:49
#define itkConceptMacro(name, concept)