SimpleITK  1.0.1
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 
54 
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<double> GetCentroid(int64_t label) const { return this->m_pfGetCentroid(label); };
127 
135  double GetElongation(int64_t label) const { return this->m_pfGetElongation(label); };
136 
144  std::vector<double> GetEquivalentEllipsoidDiameter(int64_t label) const { return this->m_pfGetEquivalentEllipsoidDiameter(label); };
145 
153  double GetEquivalentSphericalPerimeter(int64_t label) const { return this->m_pfGetEquivalentSphericalPerimeter(label); };
154 
162  double GetEquivalentSphericalRadius(int64_t label) const { return this->m_pfGetEquivalentSphericalRadius(label); };
163 
171  double GetFeretDiameter(int64_t label) const { return this->m_pfGetFeretDiameter(label); };
172 
180  double GetFlatness(int64_t label) const { return this->m_pfGetFlatness(label); };
181 
188  std::vector<int64_t> GetLabels() const { return this->m_Labels; };
189 
197  uint64_t GetNumberOfPixels(int64_t label) const { return this->m_pfGetNumberOfPixels(label); };
198 
206  uint64_t GetNumberOfPixelsOnBorder(int64_t label) const { return this->m_pfGetNumberOfPixelsOnBorder(label); };
207 
215  double GetPerimeter(int64_t label) const { return this->m_pfGetPerimeter(label); };
216 
224  double GetPerimeterOnBorder(int64_t label) const { return this->m_pfGetPerimeterOnBorder(label); };
225 
233  double GetPerimeterOnBorderRatio(int64_t label) const { return this->m_pfGetPerimeterOnBorderRatio(label); };
234 
242  double GetPhysicalSize(int64_t label) const { return this->m_pfGetPhysicalSize(label); };
243 
251  std::vector<double> GetPrincipalAxes(int64_t label) const { return this->m_pfGetPrincipalAxes(label); };
252 
260  std::vector<double> GetPrincipalMoments(int64_t label) const { return this->m_pfGetPrincipalMoments(label); };
261 
269  double GetRoundness(int64_t label) const { return this->m_pfGetRoundness(label); };
270 
278  std::vector<double> GetCenterOfGravity(int64_t label) const { return this->m_pfGetCenterOfGravity(label); };
279 
287  double GetKurtosis(int64_t label) const { return this->m_pfGetKurtosis(label); };
288 
296  double GetMaximum(int64_t label) const { return this->m_pfGetMaximum(label); };
297 
305  std::vector<uint32_t> GetMaximumIndex(int64_t label) const { return this->m_pfGetMaximumIndex(label); };
306 
314  double GetMean(int64_t label) const { return this->m_pfGetMean(label); };
315 
323  double GetMedian(int64_t label) const { return this->m_pfGetMedian(label); };
324 
332  double GetMinimum(int64_t label) const { return this->m_pfGetMinimum(label); };
333 
341  std::vector<uint32_t> GetMinimumIndex(int64_t label) const { return this->m_pfGetMinimumIndex(label); };
342 
350  double GetSkewness(int64_t label) const { return this->m_pfGetSkewness(label); };
351 
359  double GetStandardDeviation(int64_t label) const { return this->m_pfGetStandardDeviation(label); };
360 
368  double GetSum(int64_t label) const { return this->m_pfGetSum(label); };
369 
377  double GetVariance(int64_t label) const { return this->m_pfGetVariance(label); };
378 
386  double GetWeightedElongation(int64_t label) const { return this->m_pfGetWeightedElongation(label); };
387 
395  double GetWeightedFlatness(int64_t label) const { return this->m_pfGetWeightedFlatness(label); };
396 
404  std::vector<double> GetWeightedPrincipalAxes(int64_t label) const { return this->m_pfGetWeightedPrincipalAxes(label); };
405 
413  std::vector<double> GetWeightedPrincipalMoments(int64_t label) const { return this->m_pfGetWeightedPrincipalMoments(label); };
414 
416  std::string GetName() const { return std::string ("LabelIntensityStatisticsImageFilter"); }
417 
419  std::string ToString() const;
420 
421 
423  void Execute ( const Image & image, const Image & featureImage );
424 
425 
427  void Execute ( const Image & image, const Image & featureImage, double backgroundValue, bool computeFeretDiameter, bool computePerimeter, uint32_t numberOfBins );
428 
429 
431  double HasLabel(int64_t label );
432 
434  uint64_t GetNumberOfLabels( );
435 
436 
437  private:
439  typedef void (Self::*MemberFunctionType)( const Image * image, const Image * featureImage );
440 
441  friend struct detail::DualExecuteInternalAddressor<MemberFunctionType>;
442  template <class TImageType1, class TImageType2> void DualExecuteInternal ( const Image * image, const Image * featureImage );
443 
444 
445  nsstd::auto_ptr<detail::DualMemberFunctionFactory<MemberFunctionType> > m_DualMemberFactory;
446 
447 
448 
449  /* */
454  /* Docs */
455  nsstd::function<std::vector<unsigned int>(int64_t)> m_pfGetBoundingBox;
456  /* Docs */
457  nsstd::function<std::vector<double>(int64_t)> m_pfGetCentroid;
458  /* Docs */
459  nsstd::function<double(int64_t)> m_pfGetElongation;
460  /* Docs */
461  nsstd::function<std::vector<double>(int64_t)> m_pfGetEquivalentEllipsoidDiameter;
462  /* Docs */
463  nsstd::function<double(int64_t)> m_pfGetEquivalentSphericalPerimeter;
464  /* Docs */
465  nsstd::function<double(int64_t)> m_pfGetEquivalentSphericalRadius;
466  /* Docs */
467  nsstd::function<double(int64_t)> m_pfGetFeretDiameter;
468  /* Docs */
469  nsstd::function<double(int64_t)> m_pfGetFlatness;
470  /* Docs */
471  std::vector<int64_t> m_Labels;
472  /* Docs */
473  nsstd::function<uint64_t(int64_t)> m_pfGetNumberOfPixels;
474  /* Docs */
475  nsstd::function<uint64_t(int64_t)> m_pfGetNumberOfPixelsOnBorder;
476  /* Docs */
477  nsstd::function<double(int64_t)> m_pfGetPerimeter;
478  /* Docs */
479  nsstd::function<double(int64_t)> m_pfGetPerimeterOnBorder;
480  /* Docs */
481  nsstd::function<double(int64_t)> m_pfGetPerimeterOnBorderRatio;
482  /* Docs */
483  nsstd::function<double(int64_t)> m_pfGetPhysicalSize;
484  /* Docs */
485  nsstd::function<std::vector<double>(int64_t)> m_pfGetPrincipalAxes;
486  /* Docs */
487  nsstd::function<std::vector<double>(int64_t)> m_pfGetPrincipalMoments;
488  /* Docs */
489  nsstd::function<double(int64_t)> m_pfGetRoundness;
490  /* Docs */
491  nsstd::function<std::vector<double>(int64_t)> m_pfGetCenterOfGravity;
492  /* Docs */
493  nsstd::function<double(int64_t)> m_pfGetKurtosis;
494  /* Docs */
495  nsstd::function<double(int64_t)> m_pfGetMaximum;
496  /* Docs */
497  nsstd::function<std::vector<uint32_t>(int64_t)> m_pfGetMaximumIndex;
498  /* Docs */
499  nsstd::function<double(int64_t)> m_pfGetMean;
500  /* Docs */
501  nsstd::function<double(int64_t)> m_pfGetMedian;
502  /* Docs */
503  nsstd::function<double(int64_t)> m_pfGetMinimum;
504  /* Docs */
505  nsstd::function<std::vector<uint32_t>(int64_t)> m_pfGetMinimumIndex;
506  /* Docs */
507  nsstd::function<double(int64_t)> m_pfGetSkewness;
508  /* Docs */
509  nsstd::function<double(int64_t)> m_pfGetStandardDeviation;
510  /* Docs */
511  nsstd::function<double(int64_t)> m_pfGetSum;
512  /* Docs */
513  nsstd::function<double(int64_t)> m_pfGetVariance;
514  /* Docs */
515  nsstd::function<double(int64_t)> m_pfGetWeightedElongation;
516  /* Docs */
517  nsstd::function<double(int64_t)> m_pfGetWeightedFlatness;
518  /* Docs */
519  nsstd::function<std::vector<double>(int64_t)> m_pfGetWeightedPrincipalAxes;
520  /* Docs */
521  nsstd::function<std::vector<double>(int64_t)> m_pfGetWeightedPrincipalMoments;
522 
523  // Holder of process object for active measurements
525  };
526 
527 
528 
529  }
530 }
531 #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 main Image class for SimpleITK.
Definition: sitkImage.h:54
::int64_t int64_t
::uint64_t uint64_t
The base interface for SimpleITK filters that take one input image.