ITK  4.11.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:
66 
68 
71 
72  typedef typename Superclass::InputImageType InputImageType;
73  typedef typename Superclass::OutputImageType OutputImageType;
74  typedef typename InputImageType::PixelType InputPixelType;
75  typedef typename OutputImageType::PixelType OutputPixelType;
76  typedef typename OutputImageType::RegionType OutputImageRegionType;
77 
79  itkStaticConstMacro(ImageDimension, unsigned int, InputImageType ::ImageDimension);
80 
81  typedef double EigenValueType;
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:
140  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
141 
142  void VerifyPreconditions() ITK_OVERRIDE;
143 
144  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE;
145 
146 private:
147  ITK_DISALLOW_COPY_AND_ASSIGN(HessianToObjectnessMeasureImageFilter);
148 
149  // functor used to sort the eigenvalues are to be sorted
150  // |e1|<=|e2|<=...<=|eN|
151  //
152  // Returns ( abs(a) <= abs(b) )
155  {
156  return itk::Math::abs(a) <= itk::Math::abs(b);
157  }
158  };
159 
160  double m_Alpha;
161  double m_Beta;
162  double m_Gamma;
163  unsigned int m_ObjectDimension;
166 };
167 } // end namespace itk
168 
169 #ifndef ITK_MANUAL_INSTANTIATION
170 #include "itkHessianToObjectnessMeasureImageFilter.hxx"
171 #endif
172 
173 #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