Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkHessianToObjectnessMeasureImageFilter.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkHessianToObjectnessMeasureImageFilter.h,v $
00005   Language:  C++
00006   Date:      $Date: 2010-06-24 12:35:05 $
00007   Version:   $Revision: 1.9 $
00008 
00009   Copyright (c) Insight Software Consortium. All rights reserved.
00010   See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notices for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __itkHessianToObjectnessMeasureImageFilter_h
00018 #define __itkHessianToObjectnessMeasureImageFilter_h
00019 
00020 #include "itkSymmetricSecondRankTensor.h"
00021 #include "itkImageToImageFilter.h"
00022 
00023 namespace itk
00024 {
00025 
00060 template < typename TInputImage, typename TOutputImage >
00061 class ITK_EXPORT HessianToObjectnessMeasureImageFilter : public
00062 ImageToImageFilter< TInputImage,TOutputImage>
00063 {
00064 public:
00066   typedef HessianToObjectnessMeasureImageFilter Self;
00067 
00068   typedef ImageToImageFilter< TInputImage, TOutputImage >  Superclass;
00069 
00070   typedef SmartPointer< Self >                  Pointer;
00071   typedef SmartPointer< const Self >            ConstPointer;
00072 
00073   typedef typename Superclass::InputImageType   InputImageType;
00074   typedef typename Superclass::OutputImageType  OutputImageType;
00075   typedef typename InputImageType::PixelType    InputPixelType;
00076   typedef typename OutputImageType::PixelType   OutputPixelType;
00077   typedef typename OutputImageType::RegionType  OutputImageRegionType;
00078 
00080   itkStaticConstMacro(ImageDimension, unsigned int, ::itk::GetImageDimension<InputImageType>::ImageDimension);
00081 
00082   typedef double                                                                      EigenValueType;
00083   typedef itk::FixedArray< EigenValueType, itkGetStaticConstMacro( ImageDimension ) > EigenValueArrayType;
00084 
00085 
00087   itkNewMacro(Self);
00088 
00090   itkTypeMacro( HessianToObjectnessMeasureImageFilter, ImageToImageFilter );
00091 
00095   itkSetMacro(Alpha,double);
00096   itkGetConstMacro(Alpha,double);
00098 
00102   itkSetMacro(Beta,double);
00103   itkGetConstMacro(Beta,double);
00105 
00108   itkSetMacro(Gamma,double);
00109   itkGetConstMacro(Gamma,double);
00111 
00113   itkSetMacro(ScaleObjectnessMeasure,bool);
00114   itkGetConstMacro(ScaleObjectnessMeasure,bool);
00115   itkBooleanMacro(ScaleObjectnessMeasure);
00117 
00121   itkSetMacro(ObjectDimension,unsigned int);
00122   itkGetConstMacro(ObjectDimension,unsigned int);
00124 
00126   itkSetMacro(BrightObject,bool);
00127   itkGetConstMacro(BrightObject,bool);
00128   itkBooleanMacro(BrightObject);
00130 
00131 #ifdef ITK_USE_CONCEPT_CHECKING
00132 
00133   itkConceptMacro(DoubleConvertibleToOutputCheck,(Concept::Convertible<double, OutputPixelType>));
00134 
00136 #endif
00137 
00138 protected:
00139   HessianToObjectnessMeasureImageFilter();
00140   ~HessianToObjectnessMeasureImageFilter() {};
00141   void PrintSelf(std::ostream& os, Indent indent) const;
00142 
00143   void BeforeThreadedGenerateData( void );
00144   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, int threadId);
00145 
00146 private:
00147   HessianToObjectnessMeasureImageFilter(const Self&); //purposely not implemented
00148   void operator=(const Self&); //purposely not implemented
00149 
00150   // functor used to sort eigen values
00151   struct AbsCompare
00152     {
00153     bool operator()( EigenValueType a, EigenValueType b )
00154       {
00155       return vnl_math_abs(a) > vnl_math_abs(b);
00156       }
00157     };
00158 
00159   double                 m_Alpha;
00160   double                 m_Beta;
00161   double                 m_Gamma;
00162   unsigned int           m_ObjectDimension;
00163   bool                   m_BrightObject;
00164   bool                   m_ScaleObjectnessMeasure;
00165 };
00166 
00167 } // end namespace itk
00168 
00169 #ifndef ITK_MANUAL_INSTANTIATION
00170 #include "itkHessianToObjectnessMeasureImageFilter.txx"
00171 #endif
00172 
00173 #endif
00174 

Generated at Mon Jul 12 2010 18:31:45 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000