ITK  4.3.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 {
61 template< typename TInputImage, typename TOutputImage >
63  ImageToImageFilter< TInputImage, TOutputImage >
64 {
65 public:
68 
70 
73 
74  typedef typename Superclass::InputImageType InputImageType;
75  typedef typename Superclass::OutputImageType OutputImageType;
76  typedef typename InputImageType::PixelType InputPixelType;
77  typedef typename OutputImageType::PixelType OutputPixelType;
78  typedef typename OutputImageType::RegionType OutputImageRegionType;
79 
81  itkStaticConstMacro(ImageDimension, unsigned int, InputImageType ::ImageDimension);
82 
83  typedef double EigenValueType;
85 
87  itkNewMacro(Self);
88 
91 
95  itkSetMacro(Alpha, double);
96  itkGetConstMacro(Alpha, double);
98 
102  itkSetMacro(Beta, double);
103  itkGetConstMacro(Beta, double);
105 
108  itkSetMacro(Gamma, double);
109  itkGetConstMacro(Gamma, double);
111 
114  itkSetMacro(ScaleObjectnessMeasure, bool);
115  itkGetConstMacro(ScaleObjectnessMeasure, bool);
116  itkBooleanMacro(ScaleObjectnessMeasure);
118 
122  itkSetMacro(ObjectDimension, unsigned int);
123  itkGetConstMacro(ObjectDimension, unsigned int);
125 
128  itkSetMacro(BrightObject, bool);
129  itkGetConstMacro(BrightObject, bool);
130  itkBooleanMacro(BrightObject);
132 
133 #ifdef ITK_USE_CONCEPT_CHECKING
134 
135  itkConceptMacro( DoubleConvertibleToOutputCheck, ( Concept::Convertible< double, OutputPixelType > ) );
136 
138 #endif
139 
140 protected:
143  void PrintSelf(std::ostream & os, Indent indent) const;
144 
145  void BeforeThreadedGenerateData(void);
146 
147  void ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId);
148 
149 private:
150  HessianToObjectnessMeasureImageFilter(const Self &); //purposely not
151  // implemented
152  void operator=(const Self &); //purposely not
153  // implemented
154 
155  // functor used to sort the eigenvalues are to be sorted
156  // |e1|<=|e2|<=...<=|eN|
162  bool operator()(EigenValueType a, EigenValueType b)
163  {
164  return vnl_math_abs(a) <= vnl_math_abs(b);
165  }
166  };
167 
168  double m_Alpha;
169  double m_Beta;
170  double m_Gamma;
171  unsigned int m_ObjectDimension;
174 };
175 } // end namespace itk
176 
177 #ifndef ITK_MANUAL_INSTANTIATION
178 #include "itkHessianToObjectnessMeasureImageFilter.hxx"
179 #endif
180 
181 #endif
182