Orfeo Toolbox  3.16
itkStatisticsLabelObjectAccessors.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkStatisticsLabelObjectAccessors.h,v $
5  Language: C++
6  Date: $Date: 2009-08-09 11:26:48 $
7  Version: $Revision: 1.4 $
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 __itkStatisticsLabelObjectAccessors_h
18 #define __itkStatisticsLabelObjectAccessors_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 double AttributeValueType;
34 
35  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
36  {
37  return labelObject->GetMinimum();
38  }
39 };
40 
41 template< class TLabelObject >
43 {
44 public:
45  typedef TLabelObject LabelObjectType;
46  typedef double AttributeValueType;
47 
48  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
49  {
50  return labelObject->GetMaximum();
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->GetMean();
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->GetSum();
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->GetSigma();
90  }
91 };
92 
93 template< class TLabelObject >
95 {
96 public:
97  typedef TLabelObject LabelObjectType;
98  typedef double AttributeValueType;
99 
100  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
101  {
102  return labelObject->GetVariance();
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->GetMedian();
116  }
117 };
118 
119 template< class TLabelObject >
121 {
122 public:
123  typedef TLabelObject LabelObjectType;
124  typedef typename LabelObjectType::IndexType AttributeValueType;
125 
126  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
127  {
128  return labelObject->GetMaximumIndex();
129  }
130 };
131 
132 template< class TLabelObject >
134 {
135 public:
136  typedef TLabelObject LabelObjectType;
137  typedef typename LabelObjectType::IndexType AttributeValueType;
138 
139  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
140  {
141  return labelObject->GetMinimumIndex();
142  }
143 };
144 
145 template< class TLabelObject >
147 {
148 public:
149  typedef TLabelObject LabelObjectType;
150  typedef typename LabelObjectType::PointType AttributeValueType;
151 
152  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
153  {
154  return labelObject->GetCenterOfGravity();
155  }
156 };
157 
158 
159 /*
160 template< class TLabelObject >
161 class ITK_EXPORT CentralMomentsLabelObjectAccessor
162 {
163 public:
164  typedef TLabelObject LabelObjectType;
165  typedef typename LabelObjectType::MatrixType AttributeValueType;
166 
167  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
168  {
169  return labelObject->GetCentralMoments();
170  }
171  };
172 */
173 
174 template< class TLabelObject >
176 {
177 public:
178  typedef TLabelObject LabelObjectType;
180 
181  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
182  {
183  return labelObject->GetPrincipalMoments();
184  }
185 };
186 
187 template< class TLabelObject >
189 {
190 public:
191  typedef TLabelObject LabelObjectType;
193 
194  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
195  {
196  return labelObject->GetPrincipalAxes();
197  }
198 };
199 
200 template< class TLabelObject >
202 {
203 public:
204  typedef TLabelObject LabelObjectType;
205  typedef double AttributeValueType;
206 
207  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
208  {
209  return labelObject->GetKurtosis();
210  }
211 };
212 
213 template< class TLabelObject >
215 {
216 public:
217  typedef TLabelObject LabelObjectType;
218  typedef double AttributeValueType;
219 
220  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
221  {
222  return labelObject->GetSkewness();
223  }
224 };
225 
226 template< class TLabelObject >
228 {
229 public:
230  typedef TLabelObject LabelObjectType;
231  typedef double AttributeValueType;
232 
233  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
234  {
235  return labelObject->GetElongation();
236  }
237 };
238 
239 template< class TLabelObject >
241 {
242 public:
243  typedef TLabelObject LabelObjectType;
244  typedef typename LabelObjectType::HistogramType * AttributeValueType;
245 
246  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
247  {
248  return labelObject->GetHistogram();
249  }
250 };
251 
252 template< class TLabelObject >
254 {
255 public:
256  typedef TLabelObject LabelObjectType;
257  typedef double AttributeValueType;
258 
259  inline AttributeValueType operator()( const LabelObjectType * labelObject ) const
260  {
261  return labelObject->GetFlatness();
262  }
263 };
264 
265 }
266 
267 } // end namespace itk
268 
269 #endif

Generated at Sun May 19 2013 00:09:17 for Orfeo Toolbox with doxygen 1.8.3.1