Orfeo Toolbox  3.16
itkShapeLabelObjectAccessors.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkShapeLabelObjectAccessors.h,v $
5  Language: C++
6  Date: $Date: 2009-08-09 11:26:48 $
7  Version: $Revision: 1.5 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef __itkShapeLabelObjectAccessors_h
18 #define __itkShapeLabelObjectAccessors_h
20 
21 
22 namespace itk
23 {
24 
25 namespace Functor
26 {
27 
28 template< class TLabelObject >
30 {
31 public:
32  typedef TLabelObject LabelObjectType;
33  typedef unsigned long AttributeValueType;
34 
35  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
36  {
37  return labelObject->GetSize();
38  }
39 };
40 
41 template< class TLabelObject >
43 {
44 public:
45  typedef TLabelObject LabelObjectType;
46  typedef typename LabelObjectType::RegionType AttributeValueType;
47 
48  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
49  {
50  return labelObject->GetRegion();
51  }
52 };
53 
54 template< class TLabelObject >
56 {
57 public:
58  typedef TLabelObject LabelObjectType;
59  typedef double AttributeValueType;
60 
61  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
62  {
63  return labelObject->GetPhysicalSize();
64  }
65 };
66 
67 template< class TLabelObject >
69 {
70 public:
71  typedef TLabelObject LabelObjectType;
72  typedef double AttributeValueType;
73 
74  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
75  {
76  return labelObject->GetRegionElongation();
77  }
78 };
79 
80 template< class TLabelObject >
82 {
83 public:
84  typedef TLabelObject LabelObjectType;
85  typedef double AttributeValueType;
86 
87  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
88  {
89  return labelObject->GetSizeRegionRatio();
90  }
91 };
92 
93 template< class TLabelObject >
95 {
96 public:
97  typedef TLabelObject LabelObjectType;
98  typedef unsigned long AttributeValueType;
99 
100  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
101  {
102  return labelObject->GetSizeOnBorder();
103  }
104 };
105 
106 template< class TLabelObject >
108 {
109 public:
110  typedef TLabelObject LabelObjectType;
111  typedef double AttributeValueType;
112 
113  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
114  {
115  return labelObject->GetPhysicalSizeOnBorder();
116  }
117 };
118 
119 template< class TLabelObject >
121 {
122 public:
123  typedef TLabelObject LabelObjectType;
124  typedef typename LabelObjectType::CentroidType AttributeValueType;
125 
126  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
127  {
128  return labelObject->GetCentroid();
129  }
130 };
131 
132 template< class TLabelObject >
134 {
135 public:
136  typedef TLabelObject LabelObjectType;
137  typedef double AttributeValueType;
138 
139  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
140  {
141  return labelObject->GetFeretDiameter();
142  }
143 };
144 
145 template< class TLabelObject >
147 {
148 public:
149  typedef TLabelObject LabelObjectType;
151 
152  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
153  {
154  return labelObject->GetBinaryPrincipalMoments();
155  }
156 };
157 
158 template< class TLabelObject >
160 {
161 public:
162  typedef TLabelObject LabelObjectType;
164 
165  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
166  {
167  return labelObject->GetBinaryPrincipalAxes();
168  }
169 };
170 
171 template< class TLabelObject >
173 {
174 public:
175  typedef TLabelObject LabelObjectType;
176  typedef double AttributeValueType;
177 
178  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
179  {
180  return labelObject->GetBinaryElongation();
181  }
182 };
183 
184 template< class TLabelObject >
186 {
187 public:
188  typedef TLabelObject LabelObjectType;
189  typedef double AttributeValueType;
190 
191  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
192  {
193  return labelObject->GetPerimeter();
194  }
195 };
196 
197 template< class TLabelObject >
199 {
200 public:
201  typedef TLabelObject LabelObjectType;
202  typedef double AttributeValueType;
203 
204  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
205  {
206  return labelObject->GetRoundness();
207  }
208 };
209 
210 template< class TLabelObject >
212 {
213 public:
214  typedef TLabelObject LabelObjectType;
215  typedef double AttributeValueType;
216 
217  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
218  {
219  return labelObject->GetEquivalentRadius();
220  }
221 };
222 
223 template< class TLabelObject >
225 {
226 public:
227  typedef TLabelObject LabelObjectType;
228  typedef double AttributeValueType;
229 
230  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
231  {
232  return labelObject->GetEquivalentPerimeter();
233  }
234 };
235 
236 template< class TLabelObject >
238 {
239 public:
240  typedef TLabelObject LabelObjectType;
242 
243  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
244  {
245  return labelObject->GetEquivalentEllipsoidSize();
246  }
247 };
248 
249 template< class TLabelObject >
251 {
252 public:
253  typedef TLabelObject LabelObjectType;
254  typedef double AttributeValueType;
255 
256  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
257  {
258  return labelObject->GetBinaryFlatness();
259  }
260 };
261 
262 }
263 
264 } // end namespace itk
265 
266 #endif

Generated at Sun Feb 3 2013 00:06:09 for Orfeo Toolbox with doxygen 1.8.1.1