SimpleITK  1.0.1
sitkLabelShapeStatisticsImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 *
3 * Copyright Insight Software Consortium
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18 #ifndef sitkLabelShapeStatisticsImageFilter_h
19 #define sitkLabelShapeStatisticsImageFilter_h
20 
21 /*
22  * WARNING: DO NOT EDIT THIS FILE!
23  * THIS FILE IS AUTOMATICALLY GENERATED BY THE SIMPLEITK BUILD PROCESS.
24  * Please look at sitkImageFilterTemplate.h.in to make changes.
25  */
26 
27 #include <memory>
28 
29 #include "sitkBasicFilters.h"
30 #include "sitkImageFilter.h"
31 
32 namespace itk {
33  namespace simple {
34 
57  public:
59 
63 
66 
69 
70 
71 
75  SITK_RETURN_SELF_TYPE_HEADER SetBackgroundValue ( double BackgroundValue ) { this->m_BackgroundValue = BackgroundValue; return *this; }
76 
80  double GetBackgroundValue() const { return this->m_BackgroundValue; }
81 
85  SITK_RETURN_SELF_TYPE_HEADER SetComputeFeretDiameter ( bool ComputeFeretDiameter ) { this->m_ComputeFeretDiameter = ComputeFeretDiameter; return *this; }
86 
88  SITK_RETURN_SELF_TYPE_HEADER ComputeFeretDiameterOn() { return this->SetComputeFeretDiameter(true); }
89  SITK_RETURN_SELF_TYPE_HEADER ComputeFeretDiameterOff() { return this->SetComputeFeretDiameter(false); }
90 
94  bool GetComputeFeretDiameter() const { return this->m_ComputeFeretDiameter; }
95 
99  SITK_RETURN_SELF_TYPE_HEADER SetComputePerimeter ( bool ComputePerimeter ) { this->m_ComputePerimeter = ComputePerimeter; return *this; }
100 
102  SITK_RETURN_SELF_TYPE_HEADER ComputePerimeterOn() { return this->SetComputePerimeter(true); }
103  SITK_RETURN_SELF_TYPE_HEADER ComputePerimeterOff() { return this->SetComputePerimeter(false); }
104 
108  bool GetComputePerimeter() const { return this->m_ComputePerimeter; }
116  std::vector<unsigned int> GetBoundingBox(int64_t label) const { return this->m_pfGetBoundingBox(label); };
117 
125  std::vector<double> GetCentroid(int64_t label) const { return this->m_pfGetCentroid(label); };
126 
134  double GetElongation(int64_t label) const { return this->m_pfGetElongation(label); };
135 
143  std::vector<double> GetEquivalentEllipsoidDiameter(int64_t label) const { return this->m_pfGetEquivalentEllipsoidDiameter(label); };
144 
152  double GetEquivalentSphericalPerimeter(int64_t label) const { return this->m_pfGetEquivalentSphericalPerimeter(label); };
153 
161  double GetEquivalentSphericalRadius(int64_t label) const { return this->m_pfGetEquivalentSphericalRadius(label); };
162 
170  double GetFeretDiameter(int64_t label) const { return this->m_pfGetFeretDiameter(label); };
171 
179  double GetFlatness(int64_t label) const { return this->m_pfGetFlatness(label); };
180 
187  std::vector<int64_t> GetLabels() const { return this->m_Labels; };
188 
196  uint64_t GetNumberOfPixels(int64_t label) const { return this->m_pfGetNumberOfPixels(label); };
197 
205  uint64_t GetNumberOfPixelsOnBorder(int64_t label) const { return this->m_pfGetNumberOfPixelsOnBorder(label); };
206 
214  double GetPerimeter(int64_t label) const { return this->m_pfGetPerimeter(label); };
215 
223  double GetPerimeterOnBorder(int64_t label) const { return this->m_pfGetPerimeterOnBorder(label); };
224 
232  double GetPerimeterOnBorderRatio(int64_t label) const { return this->m_pfGetPerimeterOnBorderRatio(label); };
233 
241  double GetPhysicalSize(int64_t label) const { return this->m_pfGetPhysicalSize(label); };
242 
250  std::vector<double> GetPrincipalAxes(int64_t label) const { return this->m_pfGetPrincipalAxes(label); };
251 
259  std::vector<double> GetPrincipalMoments(int64_t label) const { return this->m_pfGetPrincipalMoments(label); };
260 
268  double GetRoundness(int64_t label) const { return this->m_pfGetRoundness(label); };
269 
271  std::string GetName() const { return std::string ("LabelShapeStatisticsImageFilter"); }
272 
274  std::string ToString() const;
275 
276 
278  void Execute ( const Image& image1 );
279 
280 
282  void Execute ( const Image& image1, double backgroundValue, bool computeFeretDiameter, bool computePerimeter );
283 
284 
286  double HasLabel(int64_t label );
287 
289  uint64_t GetNumberOfLabels( );
290 
291 
292  private:
293 
296  typedef void (Self::*MemberFunctionType)( const Image& image1 );
297  template <class TImageType> void ExecuteInternal ( const Image& image1 );
298 
299 
300 
301  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
302 
303  nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
304 
305 
306  /* */
310  /* Docs */
311  nsstd::function<std::vector<unsigned int>(int64_t)> m_pfGetBoundingBox;
312  /* Docs */
313  nsstd::function<std::vector<double>(int64_t)> m_pfGetCentroid;
314  /* Docs */
315  nsstd::function<double(int64_t)> m_pfGetElongation;
316  /* Docs */
317  nsstd::function<std::vector<double>(int64_t)> m_pfGetEquivalentEllipsoidDiameter;
318  /* Docs */
319  nsstd::function<double(int64_t)> m_pfGetEquivalentSphericalPerimeter;
320  /* Docs */
321  nsstd::function<double(int64_t)> m_pfGetEquivalentSphericalRadius;
322  /* Docs */
323  nsstd::function<double(int64_t)> m_pfGetFeretDiameter;
324  /* Docs */
325  nsstd::function<double(int64_t)> m_pfGetFlatness;
326  /* Docs */
327  std::vector<int64_t> m_Labels;
328  /* Docs */
329  nsstd::function<uint64_t(int64_t)> m_pfGetNumberOfPixels;
330  /* Docs */
331  nsstd::function<uint64_t(int64_t)> m_pfGetNumberOfPixelsOnBorder;
332  /* Docs */
333  nsstd::function<double(int64_t)> m_pfGetPerimeter;
334  /* Docs */
335  nsstd::function<double(int64_t)> m_pfGetPerimeterOnBorder;
336  /* Docs */
337  nsstd::function<double(int64_t)> m_pfGetPerimeterOnBorderRatio;
338  /* Docs */
339  nsstd::function<double(int64_t)> m_pfGetPhysicalSize;
340  /* Docs */
341  nsstd::function<std::vector<double>(int64_t)> m_pfGetPrincipalAxes;
342  /* Docs */
343  nsstd::function<std::vector<double>(int64_t)> m_pfGetPrincipalMoments;
344  /* Docs */
345  nsstd::function<double(int64_t)> m_pfGetRoundness;
346 
347  // Holder of process object for active measurements
349  };
350 
351 
352 
353  }
354 }
355 #endif
typelist::MakeTypeList< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t > >::Type IntegerPixelIDTypeList
#define SITKBasicFilters_EXPORT
std::vector< double > GetCentroid(int64_t label) const
std::vector< double > GetPrincipalAxes(int64_t label) const
Converts a label image to a label map and valuates the shape attributes.
std::vector< double > GetPrincipalMoments(int64_t label) const
std::vector< double > GetEquivalentEllipsoidDiameter(int64_t label) const
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
The main Image class for SimpleITK.
Definition: sitkImage.h:54
std::vector< unsigned int > GetBoundingBox(int64_t label) const
::int64_t int64_t
::uint64_t uint64_t
The base interface for SimpleITK filters that take one input image.