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

itkStatisticsLabelObjectAccessors.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkStatisticsLabelObjectAccessors.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-08-09 11:26:48 $
00007   Version:   $Revision: 1.4 $
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 __itkStatisticsLabelObjectAccessors_h
00018 #define __itkStatisticsLabelObjectAccessors_h
00019 #include "itkShapeLabelObjectAccessors.h"
00020 
00021 
00022 namespace itk
00023 {
00024 
00025 namespace Functor 
00026 {
00027 
00028 template< class TLabelObject >
00029 class ITK_EXPORT MinimumLabelObjectAccessor
00030 {
00031 public:
00032   typedef TLabelObject LabelObjectType;
00033   typedef double       AttributeValueType;
00034 
00035   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00036     {
00037     return labelObject->GetMinimum();
00038     }
00039 };
00040 
00041 template< class TLabelObject >
00042 class ITK_EXPORT MaximumLabelObjectAccessor
00043 {
00044 public:
00045   typedef TLabelObject LabelObjectType;
00046   typedef double       AttributeValueType;
00047 
00048   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00049     {
00050     return labelObject->GetMaximum();
00051     }
00052 };
00053 
00054 template< class TLabelObject >
00055 class ITK_EXPORT MeanLabelObjectAccessor
00056 {
00057 public:
00058   typedef TLabelObject LabelObjectType;
00059   typedef double       AttributeValueType;
00060 
00061   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00062     {
00063     return labelObject->GetMean();
00064     }
00065 };
00066 
00067 template< class TLabelObject >
00068 class ITK_EXPORT SumLabelObjectAccessor
00069 {
00070 public:
00071   typedef TLabelObject LabelObjectType;
00072   typedef double       AttributeValueType;
00073 
00074   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00075     {
00076     return labelObject->GetSum();
00077     }
00078 };
00079 
00080 template< class TLabelObject >
00081 class ITK_EXPORT SigmaLabelObjectAccessor
00082 {
00083 public:
00084   typedef TLabelObject LabelObjectType;
00085   typedef double       AttributeValueType;
00086 
00087   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00088     {
00089     return labelObject->GetSigma();
00090     }
00091 };
00092 
00093 template< class TLabelObject >
00094 class ITK_EXPORT VarianceLabelObjectAccessor
00095 {
00096 public:
00097   typedef TLabelObject LabelObjectType;
00098   typedef double       AttributeValueType;
00099 
00100   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00101     {
00102     return labelObject->GetVariance();
00103     }
00104 };
00105 
00106 template< class TLabelObject >
00107 class ITK_EXPORT MedianLabelObjectAccessor
00108 {
00109 public:
00110   typedef TLabelObject LabelObjectType;
00111   typedef double       AttributeValueType;
00112 
00113   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00114     {
00115     return labelObject->GetMedian();
00116     }
00117 };
00118 
00119 template< class TLabelObject >
00120 class ITK_EXPORT MaximumIndexLabelObjectAccessor
00121 {
00122 public:
00123   typedef TLabelObject                        LabelObjectType;
00124   typedef typename LabelObjectType::IndexType AttributeValueType;
00125 
00126   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00127     {
00128     return labelObject->GetMaximumIndex();
00129     }
00130 };
00131 
00132 template< class TLabelObject >
00133 class ITK_EXPORT MinimumIndexLabelObjectAccessor
00134 {
00135 public:
00136   typedef TLabelObject                        LabelObjectType;
00137   typedef typename LabelObjectType::IndexType AttributeValueType;
00138 
00139   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00140     {
00141     return labelObject->GetMinimumIndex();
00142     }
00143 };
00144 
00145 template< class TLabelObject >
00146 class ITK_EXPORT CenterOfGravityLabelObjectAccessor
00147 {
00148 public:
00149   typedef TLabelObject                        LabelObjectType;
00150   typedef typename LabelObjectType::PointType AttributeValueType;
00151 
00152   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00153     {
00154     return labelObject->GetCenterOfGravity();
00155     }
00156 };
00157 
00158 
00159 /*
00160 template< class TLabelObject >
00161 class ITK_EXPORT CentralMomentsLabelObjectAccessor
00162 {
00163 public:
00164   typedef TLabelObject LabelObjectType;
00165   typedef typename LabelObjectType::MatrixType AttributeValueType;
00166 
00167   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00168     {
00169     return labelObject->GetCentralMoments();
00170     }
00171   };
00172 */
00173 
00174 template< class TLabelObject >
00175 class ITK_EXPORT PrincipalMomentsLabelObjectAccessor
00176 {
00177 public:
00178   typedef TLabelObject                         LabelObjectType;
00179   typedef typename LabelObjectType::VectorType AttributeValueType;
00180 
00181   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00182     {
00183     return labelObject->GetPrincipalMoments();
00184     }
00185 };
00186 
00187 template< class TLabelObject >
00188 class ITK_EXPORT PrincipalAxesLabelObjectAccessor
00189 {
00190 public:
00191   typedef TLabelObject                         LabelObjectType;
00192   typedef typename LabelObjectType::MatrixType AttributeValueType;
00193 
00194   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00195     {
00196     return labelObject->GetPrincipalAxes();
00197     }
00198 };
00199 
00200 template< class TLabelObject >
00201 class ITK_EXPORT KurtosisLabelObjectAccessor
00202 {
00203 public:
00204   typedef TLabelObject LabelObjectType;
00205   typedef double       AttributeValueType;
00206 
00207   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00208     {
00209     return labelObject->GetKurtosis();
00210     }
00211 };
00212 
00213 template< class TLabelObject >
00214 class ITK_EXPORT SkewnessLabelObjectAccessor
00215 {
00216 public:
00217   typedef TLabelObject LabelObjectType;
00218   typedef double       AttributeValueType;
00219 
00220   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00221     {
00222     return labelObject->GetSkewness();
00223     }
00224 };
00225 
00226 template< class TLabelObject >
00227 class ITK_EXPORT ElongationLabelObjectAccessor
00228 {
00229 public:
00230   typedef TLabelObject LabelObjectType;
00231   typedef double       AttributeValueType;
00232 
00233   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00234     {
00235     return labelObject->GetElongation();
00236     }
00237 };
00238 
00239 template< class TLabelObject >
00240 class ITK_EXPORT HistogramLabelObjectAccessor
00241 {
00242 public:
00243   typedef TLabelObject                              LabelObjectType;
00244   typedef typename LabelObjectType::HistogramType * AttributeValueType;
00245 
00246   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00247     {
00248     return labelObject->GetHistogram();
00249     }
00250 };
00251 
00252 template< class TLabelObject >
00253 class ITK_EXPORT FlatnessLabelObjectAccessor
00254 {
00255 public:
00256   typedef TLabelObject LabelObjectType;
00257   typedef double       AttributeValueType;
00258 
00259   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00260     {
00261     return labelObject->GetFlatness();
00262     }
00263 };
00264 
00265 }
00266 
00267 } // end namespace itk
00268 
00269 #endif
00270 

Generated at Fri Apr 16 19:45:52 2010 for ITK by doxygen 1.6.1 written by Dimitri van Heesch, © 1997-2000