ITK  4.13.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 
70 
71  typedef typename Superclass::InputImageType InputImageType;
72  typedef typename Superclass::OutputImageType OutputImageType;
73  typedef typename InputImageType::PixelType InputPixelType;
74  typedef typename OutputImageType::PixelType OutputPixelType;
75  typedef typename OutputImageType::RegionType OutputImageRegionType;
76 
78  itkStaticConstMacro(ImageDimension, unsigned int, InputImageType ::ImageDimension);
79 
80  typedef double EigenValueType;
82 
84  itkNewMacro(Self);
85 
88 
92  itkSetMacro(Alpha, double);
93  itkGetConstMacro(Alpha, double);
95 
99  itkSetMacro(Beta, double);
100  itkGetConstMacro(Beta, double);
102 
105  itkSetMacro(Gamma, double);
106  itkGetConstMacro(Gamma, double);
108 
111  itkSetMacro(ScaleObjectnessMeasure, bool);
112  itkGetConstMacro(ScaleObjectnessMeasure, bool);
113  itkBooleanMacro(ScaleObjectnessMeasure);
115 
119  itkSetMacro(ObjectDimension, unsigned int);
120  itkGetConstMacro(ObjectDimension, unsigned int);
122 
125  itkSetMacro(BrightObject, bool);
126  itkGetConstMacro(BrightObject, bool);
127  itkBooleanMacro(BrightObject);
129 
130 #ifdef ITK_USE_CONCEPT_CHECKING
131  // Begin concept checking
132  itkConceptMacro( DoubleConvertibleToOutputCheck, ( Concept::Convertible< double, OutputPixelType > ) );
133  // End concept checking
134 #endif
135 
136 protected:
139  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
140 
141  void VerifyPreconditions() ITK_OVERRIDE;
142 
143  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE;
144 
145 private:
146  ITK_DISALLOW_COPY_AND_ASSIGN(HessianToObjectnessMeasureImageFilter);
147 
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;
160  double m_Beta;
161  double m_Gamma;
162  unsigned int m_ObjectDimension;
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.
Base class for all process objects that output image data.
Simulate a standard C array with copy semnatics.
Definition: itkFixedArray.h:50
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
ImageToImageFilter< TInputImage, TOutputImage > Superclass
itk::FixedArray< EigenValueType, itkGetStaticConstMacro(ImageDimension) > EigenValueArrayType
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)
bool abs(const bool x)
Definition: itkMath.h:806