SimpleITK  1.3.0.dev466
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 
51  public:
53 
56 
60 
63 
64 
65 
69  SITK_RETURN_SELF_TYPE_HEADER SetBackgroundValue ( double BackgroundValue ) { this->m_BackgroundValue = BackgroundValue; return *this; }
70 
74  double GetBackgroundValue() const { return this->m_BackgroundValue; }
75 
79  SITK_RETURN_SELF_TYPE_HEADER SetComputeFeretDiameter ( bool ComputeFeretDiameter ) { this->m_ComputeFeretDiameter = ComputeFeretDiameter; return *this; }
80 
82  SITK_RETURN_SELF_TYPE_HEADER ComputeFeretDiameterOn() { return this->SetComputeFeretDiameter(true); }
83  SITK_RETURN_SELF_TYPE_HEADER ComputeFeretDiameterOff() { return this->SetComputeFeretDiameter(false); }
84 
88  bool GetComputeFeretDiameter() const { return this->m_ComputeFeretDiameter; }
89 
93  SITK_RETURN_SELF_TYPE_HEADER SetComputePerimeter ( bool ComputePerimeter ) { this->m_ComputePerimeter = ComputePerimeter; return *this; }
94 
96  SITK_RETURN_SELF_TYPE_HEADER ComputePerimeterOn() { return this->SetComputePerimeter(true); }
97  SITK_RETURN_SELF_TYPE_HEADER ComputePerimeterOff() { return this->SetComputePerimeter(false); }
98 
102  bool GetComputePerimeter() const { return this->m_ComputePerimeter; }
103 
107  SITK_RETURN_SELF_TYPE_HEADER SetComputeOrientedBoundingBox ( bool ComputeOrientedBoundingBox ) { this->m_ComputeOrientedBoundingBox = ComputeOrientedBoundingBox; return *this; }
108 
110  SITK_RETURN_SELF_TYPE_HEADER ComputeOrientedBoundingBoxOn() { return this->SetComputeOrientedBoundingBox(true); }
111  SITK_RETURN_SELF_TYPE_HEADER ComputeOrientedBoundingBoxOff() { return this->SetComputeOrientedBoundingBox(false); }
112 
116  bool GetComputeOrientedBoundingBox() const { return this->m_ComputeOrientedBoundingBox; }
124  std::vector<unsigned int> GetBoundingBox(int64_t label) const { return this->m_pfGetBoundingBox(label); };
125 
133  std::vector<unsigned int> GetRegion(int64_t label) const { return this->m_pfGetRegion(label); };
134 
142  std::vector<double> GetCentroid(int64_t label) const { return this->m_pfGetCentroid(label); };
143 
151  double GetElongation(int64_t label) const { return this->m_pfGetElongation(label); };
152 
160  std::vector<double> GetEquivalentEllipsoidDiameter(int64_t label) const { return this->m_pfGetEquivalentEllipsoidDiameter(label); };
161 
169  double GetEquivalentSphericalPerimeter(int64_t label) const { return this->m_pfGetEquivalentSphericalPerimeter(label); };
170 
178  double GetEquivalentSphericalRadius(int64_t label) const { return this->m_pfGetEquivalentSphericalRadius(label); };
179 
187  double GetFeretDiameter(int64_t label) const { return this->m_pfGetFeretDiameter(label); };
188 
196  double GetFlatness(int64_t label) const { return this->m_pfGetFlatness(label); };
197 
204  std::vector<int64_t> GetLabels() const { return this->m_Labels; };
205 
213  uint64_t GetNumberOfPixels(int64_t label) const { return this->m_pfGetNumberOfPixels(label); };
214 
222  uint64_t GetNumberOfPixelsOnBorder(int64_t label) const { return this->m_pfGetNumberOfPixelsOnBorder(label); };
223 
231  double GetPerimeter(int64_t label) const { return this->m_pfGetPerimeter(label); };
232 
240  double GetPerimeterOnBorder(int64_t label) const { return this->m_pfGetPerimeterOnBorder(label); };
241 
249  double GetPerimeterOnBorderRatio(int64_t label) const { return this->m_pfGetPerimeterOnBorderRatio(label); };
250 
258  double GetPhysicalSize(int64_t label) const { return this->m_pfGetPhysicalSize(label); };
259 
267  std::vector<double> GetPrincipalAxes(int64_t label) const { return this->m_pfGetPrincipalAxes(label); };
268 
276  std::vector<double> GetPrincipalMoments(int64_t label) const { return this->m_pfGetPrincipalMoments(label); };
277 
285  double GetRoundness(int64_t label) const { return this->m_pfGetRoundness(label); };
286 
294  std::vector<double> GetOrientedBoundingBoxSize(int64_t label) const { return this->m_pfGetOrientedBoundingBoxSize(label); };
295 
303  std::vector<double> GetOrientedBoundingBoxOrigin(int64_t label) const { return this->m_pfGetOrientedBoundingBoxOrigin(label); };
304 
312  std::vector<double> GetOrientedBoundingBoxDirection(int64_t label) const { return this->m_pfGetOrientedBoundingBoxDirection(label); };
313 
321  std::vector<double> GetOrientedBoundingBoxVertices(int64_t label) const { return this->m_pfGetOrientedBoundingBoxVertices(label); };
322 
324  std::string GetName() const { return std::string ("LabelShapeStatisticsImageFilter"); }
325 
327  std::string ToString() const;
328 
329 
331  void Execute ( const Image& image1 );
332 
333 
335  void Execute ( const Image& image1, double backgroundValue, bool computeFeretDiameter, bool computePerimeter, bool computeOrientedBoundingBox );
336 
337 
339  bool HasLabel(int64_t label );
340 
342  uint64_t GetNumberOfLabels( );
343 
344  private:
345 
348  typedef void (Self::*MemberFunctionType)( const Image& image1 );
349  template <class TImageType> void ExecuteInternal ( const Image& image1 );
350 
351 
352  friend struct detail::MemberFunctionAddressor<MemberFunctionType>;
353 
354  nsstd::auto_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
355 
356 
357  /* */
362  /* Docs */
363  nsstd::function<std::vector<unsigned int>(int64_t)> m_pfGetBoundingBox;
364  /* Docs */
365  nsstd::function<std::vector<unsigned int>(int64_t)> m_pfGetRegion;
366  /* Docs */
367  nsstd::function<std::vector<double>(int64_t)> m_pfGetCentroid;
368  /* Docs */
369  nsstd::function<double(int64_t)> m_pfGetElongation;
370  /* Docs */
371  nsstd::function<std::vector<double>(int64_t)> m_pfGetEquivalentEllipsoidDiameter;
372  /* Docs */
373  nsstd::function<double(int64_t)> m_pfGetEquivalentSphericalPerimeter;
374  /* Docs */
375  nsstd::function<double(int64_t)> m_pfGetEquivalentSphericalRadius;
376  /* Docs */
377  nsstd::function<double(int64_t)> m_pfGetFeretDiameter;
378  /* Docs */
379  nsstd::function<double(int64_t)> m_pfGetFlatness;
380  /* Docs */
381  std::vector<int64_t> m_Labels;
382  /* Docs */
383  nsstd::function<uint64_t(int64_t)> m_pfGetNumberOfPixels;
384  /* Docs */
385  nsstd::function<uint64_t(int64_t)> m_pfGetNumberOfPixelsOnBorder;
386  /* Docs */
387  nsstd::function<double(int64_t)> m_pfGetPerimeter;
388  /* Docs */
389  nsstd::function<double(int64_t)> m_pfGetPerimeterOnBorder;
390  /* Docs */
391  nsstd::function<double(int64_t)> m_pfGetPerimeterOnBorderRatio;
392  /* Docs */
393  nsstd::function<double(int64_t)> m_pfGetPhysicalSize;
394  /* Docs */
395  nsstd::function<std::vector<double>(int64_t)> m_pfGetPrincipalAxes;
396  /* Docs */
397  nsstd::function<std::vector<double>(int64_t)> m_pfGetPrincipalMoments;
398  /* Docs */
399  nsstd::function<double(int64_t)> m_pfGetRoundness;
400  /* Docs */
401  nsstd::function<std::vector<double>(int64_t)> m_pfGetOrientedBoundingBoxSize;
402  /* Docs */
403  nsstd::function<std::vector<double>(int64_t)> m_pfGetOrientedBoundingBoxOrigin;
404  /* Docs */
405  nsstd::function<std::vector<double>(int64_t)> m_pfGetOrientedBoundingBoxDirection;
406  /* Docs */
407  nsstd::function<std::vector<double>(int64_t)> m_pfGetOrientedBoundingBoxVertices;
408 
409  // Holder of process object for active measurements
411  };
412 
413 
414  }
415 }
416 #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
Self & SetComputeOrientedBoundingBox(bool ComputeOrientedBoundingBox)
std::vector< double > GetCentroid(int64_t label) const
std::vector< double > GetOrientedBoundingBoxSize(int64_t label) const
std::vector< double > GetPrincipalAxes(int64_t label) const
std::vector< double > GetOrientedBoundingBoxDirection(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
std::vector< unsigned int > GetRegion(int64_t label) const
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
The Image class for SimpleITK.
Definition: sitkImage.h:78
std::vector< unsigned int > GetBoundingBox(int64_t label) const
::int64_t int64_t
std::vector< double > GetOrientedBoundingBoxOrigin(int64_t label) const
std::vector< double > GetOrientedBoundingBoxVertices(int64_t label) const
::uint64_t uint64_t
The base interface for SimpleITK filters that take one input image.