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

itkShapeLabelObjectAccessors.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Insight Segmentation & Registration Toolkit
00004   Module:    $RCSfile: itkShapeLabelObjectAccessors.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009-08-09 11:26:48 $
00007   Version:   $Revision: 1.5 $
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 __itkShapeLabelObjectAccessors_h
00018 #define __itkShapeLabelObjectAccessors_h
00019 #include "itkLabelObjectAccessors.h"
00020 
00021 
00022 namespace itk
00023 {
00024 
00025 namespace Functor 
00026 {
00027 
00028 template< class TLabelObject >
00029 class ITK_EXPORT SizeLabelObjectAccessor
00030 {
00031 public:
00032   typedef TLabelObject  LabelObjectType;
00033   typedef unsigned long AttributeValueType;
00034 
00035   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00036     {
00037     return labelObject->GetSize();
00038     }
00039 };
00040 
00041 template< class TLabelObject >
00042 class ITK_EXPORT RegionLabelObjectAccessor
00043 {
00044 public:
00045   typedef TLabelObject                         LabelObjectType;
00046   typedef typename LabelObjectType::RegionType AttributeValueType;
00047 
00048   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00049     {
00050     return labelObject->GetRegion();
00051     }
00052 };
00053 
00054 template< class TLabelObject >
00055 class ITK_EXPORT PhysicalSizeLabelObjectAccessor
00056 {
00057 public:
00058   typedef TLabelObject LabelObjectType;
00059   typedef double       AttributeValueType;
00060 
00061   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00062     {
00063     return labelObject->GetPhysicalSize();
00064     }
00065 };
00066 
00067 template< class TLabelObject >
00068 class ITK_EXPORT RegionElongationLabelObjectAccessor
00069 {
00070 public:
00071   typedef TLabelObject LabelObjectType;
00072   typedef double       AttributeValueType;
00073 
00074   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00075     {
00076     return labelObject->GetRegionElongation();
00077     }
00078 };
00079 
00080 template< class TLabelObject >
00081 class ITK_EXPORT SizeRegionRatioLabelObjectAccessor
00082 {
00083 public:
00084   typedef TLabelObject LabelObjectType;
00085   typedef double       AttributeValueType;
00086 
00087   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00088     {
00089     return labelObject->GetSizeRegionRatio();
00090     }
00091 };
00092 
00093 template< class TLabelObject >
00094 class ITK_EXPORT SizeOnBorderLabelObjectAccessor
00095 {
00096 public:
00097   typedef TLabelObject  LabelObjectType;
00098   typedef unsigned long AttributeValueType;
00099 
00100   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00101     {
00102     return labelObject->GetSizeOnBorder();
00103     }
00104 };
00105 
00106 template< class TLabelObject >
00107 class ITK_EXPORT PhysicalSizeOnBorderLabelObjectAccessor
00108 {
00109 public:
00110   typedef TLabelObject LabelObjectType;
00111   typedef double       AttributeValueType;
00112 
00113   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00114     {
00115     return labelObject->GetPhysicalSizeOnBorder();
00116     }
00117 };
00118 
00119 template< class TLabelObject >
00120 class ITK_EXPORT CentroidLabelObjectAccessor
00121 {
00122 public:
00123   typedef TLabelObject                           LabelObjectType;
00124   typedef typename LabelObjectType::CentroidType AttributeValueType;
00125 
00126   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00127     {
00128     return labelObject->GetCentroid();
00129     }
00130 };
00131 
00132 template< class TLabelObject >
00133 class ITK_EXPORT FeretDiameterLabelObjectAccessor
00134 {
00135 public:
00136   typedef TLabelObject LabelObjectType;
00137   typedef double       AttributeValueType;
00138 
00139   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00140     {
00141     return labelObject->GetFeretDiameter();
00142     }
00143 };
00144 
00145 template< class TLabelObject >
00146 class ITK_EXPORT BinaryPrincipalMomentsLabelObjectAccessor
00147 {
00148 public:
00149   typedef TLabelObject                         LabelObjectType;
00150   typedef typename LabelObjectType::VectorType AttributeValueType;
00151 
00152   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00153     {
00154     return labelObject->GetBinaryPrincipalMoments();
00155     }
00156 };
00157 
00158 template< class TLabelObject >
00159 class ITK_EXPORT BinaryPrincipalAxesLabelObjectAccessor
00160 {
00161 public:
00162   typedef TLabelObject                         LabelObjectType;
00163   typedef typename LabelObjectType::MatrixType AttributeValueType;
00164 
00165   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00166     {
00167     return labelObject->GetBinaryPrincipalAxes();
00168     }
00169 };
00170 
00171 template< class TLabelObject >
00172 class ITK_EXPORT BinaryElongationLabelObjectAccessor
00173 {
00174 public:
00175   typedef TLabelObject LabelObjectType;
00176   typedef double       AttributeValueType;
00177 
00178   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00179     {
00180     return labelObject->GetBinaryElongation();
00181     }
00182 };
00183 
00184 template< class TLabelObject >
00185 class ITK_EXPORT PerimeterLabelObjectAccessor
00186 {
00187 public:
00188   typedef TLabelObject LabelObjectType;
00189   typedef double       AttributeValueType;
00190 
00191   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00192     {
00193     return labelObject->GetPerimeter();
00194     }
00195 };
00196 
00197 template< class TLabelObject >
00198 class ITK_EXPORT RoundnessLabelObjectAccessor
00199 {
00200 public:
00201   typedef TLabelObject LabelObjectType;
00202   typedef double       AttributeValueType;
00203 
00204   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00205     {
00206     return labelObject->GetRoundness();
00207     }
00208 };
00209 
00210 template< class TLabelObject >
00211 class ITK_EXPORT EquivalentRadiusLabelObjectAccessor
00212 {
00213 public:
00214   typedef TLabelObject LabelObjectType;
00215   typedef double       AttributeValueType;
00216 
00217   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00218     {
00219     return labelObject->GetEquivalentRadius();
00220     }
00221 };
00222 
00223 template< class TLabelObject >
00224 class ITK_EXPORT EquivalentPerimeterLabelObjectAccessor
00225 {
00226 public:
00227   typedef TLabelObject LabelObjectType;
00228   typedef double       AttributeValueType;
00229 
00230   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00231     {
00232     return labelObject->GetEquivalentPerimeter();
00233     }
00234 };
00235 
00236 template< class TLabelObject >
00237 class ITK_EXPORT EquivalentEllipsoidSizeLabelObjectAccessor
00238 {
00239 public:
00240   typedef TLabelObject                         LabelObjectType;
00241   typedef typename LabelObjectType::VectorType AttributeValueType;
00242 
00243   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00244     {
00245     return labelObject->GetEquivalentEllipsoidSize();
00246     }
00247 };
00248 
00249 template< class TLabelObject >
00250 class ITK_EXPORT BinaryFlatnessLabelObjectAccessor
00251 {
00252 public:
00253   typedef TLabelObject LabelObjectType;
00254   typedef double       AttributeValueType;
00255 
00256   inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
00257     {
00258     return labelObject->GetBinaryFlatness();
00259     }
00260 };
00261 
00262 }
00263 
00264 } // end namespace itk
00265 
00266 #endif
00267 

Generated at Mon Jul 12 2010 19:51:06 for ITK by doxygen 1.7.1 written by Dimitri van Heesch, © 1997-2000