SimpleITK  1.2.4
sitkLabelIntensityStatisticsImageFilter.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 sitkLabelIntensityStatisticsImageFilter_h
19 #define sitkLabelIntensityStatisticsImageFilter_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 sitkDualImageFilterTemplate.h.in to make changes.
25  */
26 
27 #include <memory>
28 
29 #include "sitkImageFilter.h"
31 #include "sitkBasicFilters.h"
32 
33 namespace itk {
34  namespace simple {
35 
48  public:
50 
53 
57 
60 
61 
62 
66  SITK_RETURN_SELF_TYPE_HEADER SetBackgroundValue ( double BackgroundValue ) { this->m_BackgroundValue = BackgroundValue; return *this; }
67 
71  double GetBackgroundValue() const { return this->m_BackgroundValue; }
72 
76  SITK_RETURN_SELF_TYPE_HEADER SetComputeFeretDiameter ( bool ComputeFeretDiameter ) { this->m_ComputeFeretDiameter = ComputeFeretDiameter; return *this; }
77 
79  SITK_RETURN_SELF_TYPE_HEADER ComputeFeretDiameterOn() { return this->SetComputeFeretDiameter(true); }
80  SITK_RETURN_SELF_TYPE_HEADER ComputeFeretDiameterOff() { return this->SetComputeFeretDiameter(false); }
81 
85  bool GetComputeFeretDiameter() const { return this->m_ComputeFeretDiameter; }
86 
90  SITK_RETURN_SELF_TYPE_HEADER SetComputePerimeter ( bool ComputePerimeter ) { this->m_ComputePerimeter = ComputePerimeter; return *this; }
91 
93  SITK_RETURN_SELF_TYPE_HEADER ComputePerimeterOn() { return this->SetComputePerimeter(true); }
94  SITK_RETURN_SELF_TYPE_HEADER ComputePerimeterOff() { return this->SetComputePerimeter(false); }
95 
99  bool GetComputePerimeter() const { return this->m_ComputePerimeter; }
100 
104  SITK_RETURN_SELF_TYPE_HEADER SetNumberOfBins ( uint32_t NumberOfBins ) { this->m_NumberOfBins = NumberOfBins; return *this; }
105 
109  uint32_t GetNumberOfBins() const { return this->m_NumberOfBins; }
117  std::vector<unsigned int> GetBoundingBox(int64_t label) const { return this->m_pfGetBoundingBox(label); };
118 
126  std::vector<unsigned int> GetRegion(int64_t label) const { return this->m_pfGetRegion(label); };
127 
135  std::vector<double> GetCentroid(int64_t label) const { return this->m_pfGetCentroid(label); };
136 
144  double GetElongation(int64_t label) const { return this->m_pfGetElongation(label); };
145 
153  std::vector<double> GetEquivalentEllipsoidDiameter(int64_t label) const { return this->m_pfGetEquivalentEllipsoidDiameter(label); };
154 
162  double GetEquivalentSphericalPerimeter(int64_t label) const { return this->m_pfGetEquivalentSphericalPerimeter(label); };
163 
171  double GetEquivalentSphericalRadius(int64_t label) const { return this->m_pfGetEquivalentSphericalRadius(label); };
172 
180  double GetFeretDiameter(int64_t label) const { return this->m_pfGetFeretDiameter(label); };
181 
189  double GetFlatness(int64_t label) const { return this->m_pfGetFlatness(label); };
190 
197  std::vector<int64_t> GetLabels() const { return this->m_Labels; };
198 
206  uint64_t GetNumberOfPixels(int64_t label) const { return this->m_pfGetNumberOfPixels(label); };
207 
215  uint64_t GetNumberOfPixelsOnBorder(int64_t label) const { return this->m_pfGetNumberOfPixelsOnBorder(label); };
216 
224  double GetPerimeter(int64_t label) const { return this->m_pfGetPerimeter(label); };
225 
233  double GetPerimeterOnBorder(int64_t label) const { return this->m_pfGetPerimeterOnBorder(label); };
234 
242  double GetPerimeterOnBorderRatio(int64_t label) const { return this->m_pfGetPerimeterOnBorderRatio(label); };
243 
251  double GetPhysicalSize(int64_t label) const { return this->m_pfGetPhysicalSize(label); };
252 
260  std::vector<double> GetPrincipalAxes(int64_t label) const { return this->m_pfGetPrincipalAxes(label); };
261 
269  std::vector<double> GetPrincipalMoments(int64_t label) const { return this->m_pfGetPrincipalMoments(label); };
270 
278  double GetRoundness(int64_t label) const { return this->m_pfGetRoundness(label); };
279 
287  std::vector<double> GetCenterOfGravity(int64_t label) const { return this->m_pfGetCenterOfGravity(label); };
288 
296  double GetKurtosis(int64_t label) const { return this->m_pfGetKurtosis(label); };
297 
305  double GetMaximum(int64_t label) const { return this->m_pfGetMaximum(label); };
306 
314  std::vector<uint32_t> GetMaximumIndex(int64_t label) const { return this->m_pfGetMaximumIndex(label); };
315 
323  double GetMean(int64_t label) const { return this->m_pfGetMean(label); };
324 
332  double GetMedian(int64_t label) const { return this->m_pfGetMedian(label); };
333 
341  double GetMinimum(int64_t label) const { return this->m_pfGetMinimum(label); };
342 
350  std::vector<uint32_t> GetMinimumIndex(int64_t label) const { return this->m_pfGetMinimumIndex(label); };
351 
359  double GetSkewness(int64_t label) const { return this->m_pfGetSkewness(label); };
360 
368  double GetStandardDeviation(int64_t label) const { return this->m_pfGetStandardDeviation(label); };
369 
377  double GetSum(int64_t label) const { return this->m_pfGetSum(label); };
378 
386  double GetVariance(int64_t label) const { return this->m_pfGetVariance(label); };
387 
395  double GetWeightedElongation(int64_t label) const { return this->m_pfGetWeightedElongation(label); };
396 
404  double GetWeightedFlatness(int64_t label) const { return this->m_pfGetWeightedFlatness(label); };
405 
413  std::vector<double> GetWeightedPrincipalAxes(int64_t label) const { return this->m_pfGetWeightedPrincipalAxes(label); };
414 
422  std::vector<double> GetWeightedPrincipalMoments(int64_t label) const { return this->m_pfGetWeightedPrincipalMoments(label); };
423 
425  std::string GetName() const { return std::string ("LabelIntensityStatisticsImageFilter"); }
426 
428  std::string ToString() const;
429 
430 
432  void Execute ( const Image & image, const Image & featureImage );
433 
434 
436  void Execute ( const Image & image, const Image & featureImage, double backgroundValue, bool computeFeretDiameter, bool computePerimeter, uint32_t numberOfBins );
437 
438 
440  bool HasLabel(int64_t label );
441 
443  uint64_t GetNumberOfLabels( );
444 
445 
446  private:
448  typedef void (Self::*MemberFunctionType)( const Image * image, const Image * featureImage );
449 
450  friend struct detail::DualExecuteInternalAddressor<MemberFunctionType>;
451  template <class TImageType1, class TImageType2> void DualExecuteInternal ( const Image * image, const Image * featureImage );
452 
453 
454  nsstd::auto_ptr<detail::DualMemberFunctionFactory<MemberFunctionType> > m_DualMemberFactory;
455 
456 
457 
458  /* */
463  /* Docs */
464  nsstd::function<std::vector<unsigned int>(int64_t)> m_pfGetBoundingBox;
465  /* Docs */
466  nsstd::function<std::vector<unsigned int>(int64_t)> m_pfGetRegion;
467  /* Docs */
468  nsstd::function<std::vector<double>(int64_t)> m_pfGetCentroid;
469  /* Docs */
470  nsstd::function<double(int64_t)> m_pfGetElongation;
471  /* Docs */
472  nsstd::function<std::vector<double>(int64_t)> m_pfGetEquivalentEllipsoidDiameter;
473  /* Docs */
474  nsstd::function<double(int64_t)> m_pfGetEquivalentSphericalPerimeter;
475  /* Docs */
476  nsstd::function<double(int64_t)> m_pfGetEquivalentSphericalRadius;
477  /* Docs */
478  nsstd::function<double(int64_t)> m_pfGetFeretDiameter;
479  /* Docs */
480  nsstd::function<double(int64_t)> m_pfGetFlatness;
481  /* Docs */
482  std::vector<int64_t> m_Labels;
483  /* Docs */
484  nsstd::function<uint64_t(int64_t)> m_pfGetNumberOfPixels;
485  /* Docs */
486  nsstd::function<uint64_t(int64_t)> m_pfGetNumberOfPixelsOnBorder;
487  /* Docs */
488  nsstd::function<double(int64_t)> m_pfGetPerimeter;
489  /* Docs */
490  nsstd::function<double(int64_t)> m_pfGetPerimeterOnBorder;
491  /* Docs */
492  nsstd::function<double(int64_t)> m_pfGetPerimeterOnBorderRatio;
493  /* Docs */
494  nsstd::function<double(int64_t)> m_pfGetPhysicalSize;
495  /* Docs */
496  nsstd::function<std::vector<double>(int64_t)> m_pfGetPrincipalAxes;
497  /* Docs */
498  nsstd::function<std::vector<double>(int64_t)> m_pfGetPrincipalMoments;
499  /* Docs */
500  nsstd::function<double(int64_t)> m_pfGetRoundness;
501  /* Docs */
502  nsstd::function<std::vector<double>(int64_t)> m_pfGetCenterOfGravity;
503  /* Docs */
504  nsstd::function<double(int64_t)> m_pfGetKurtosis;
505  /* Docs */
506  nsstd::function<double(int64_t)> m_pfGetMaximum;
507  /* Docs */
508  nsstd::function<std::vector<uint32_t>(int64_t)> m_pfGetMaximumIndex;
509  /* Docs */
510  nsstd::function<double(int64_t)> m_pfGetMean;
511  /* Docs */
512  nsstd::function<double(int64_t)> m_pfGetMedian;
513  /* Docs */
514  nsstd::function<double(int64_t)> m_pfGetMinimum;
515  /* Docs */
516  nsstd::function<std::vector<uint32_t>(int64_t)> m_pfGetMinimumIndex;
517  /* Docs */
518  nsstd::function<double(int64_t)> m_pfGetSkewness;
519  /* Docs */
520  nsstd::function<double(int64_t)> m_pfGetStandardDeviation;
521  /* Docs */
522  nsstd::function<double(int64_t)> m_pfGetSum;
523  /* Docs */
524  nsstd::function<double(int64_t)> m_pfGetVariance;
525  /* Docs */
526  nsstd::function<double(int64_t)> m_pfGetWeightedElongation;
527  /* Docs */
528  nsstd::function<double(int64_t)> m_pfGetWeightedFlatness;
529  /* Docs */
530  nsstd::function<std::vector<double>(int64_t)> m_pfGetWeightedPrincipalAxes;
531  /* Docs */
532  nsstd::function<std::vector<double>(int64_t)> m_pfGetWeightedPrincipalMoments;
533 
534  // Holder of process object for active measurements
536  };
537 
538 
539 
540  }
541 }
542 #endif
nsstd::auto_ptr< detail::DualMemberFunctionFactory< MemberFunctionType > > m_DualMemberFactory
typelist::MakeTypeList< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t > >::Type IntegerPixelIDTypeList
std::vector< double > GetWeightedPrincipalMoments(int64_t label) const
a convenient class to convert a label image to a label map and valuate the statistics attributes at o...
#define SITKBasicFilters_EXPORT
std::vector< double > GetWeightedPrincipalAxes(int64_t label) const
std::vector< double > GetEquivalentEllipsoidDiameter(int64_t label) const
std::vector< unsigned int > GetBoundingBox(int64_t label) const
::uint32_t uint32_t
The Image class for SimpleITK.
Definition: sitkImage.h:78
std::vector< unsigned int > GetRegion(int64_t label) const
::int64_t int64_t
::uint64_t uint64_t
The base interface for SimpleITK filters that take one input image.