SimpleITK  1.1.0
sitkLabelStatisticsImageFilter.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 sitkLabelStatisticsImageFilter_h
19 #define sitkLabelStatisticsImageFilter_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 
54  public:
56 
58  virtual ~LabelStatisticsImageFilter();
59 
63 
66 
67 
68 
71  SITK_RETURN_SELF_TYPE_HEADER SetUseHistograms ( bool UseHistograms ) { this->m_UseHistograms = UseHistograms; return *this; }
72 
74  SITK_RETURN_SELF_TYPE_HEADER UseHistogramsOn() { return this->SetUseHistograms(true); }
75  SITK_RETURN_SELF_TYPE_HEADER UseHistogramsOff() { return this->SetUseHistograms(false); }
76 
79  bool GetUseHistograms() const { return this->m_UseHistograms; }
87  double GetMinimum(int64_t label) const { return this->m_pfGetMinimum(label); };
88 
96  double GetMaximum(int64_t label) const { return this->m_pfGetMaximum(label); };
97 
105  double GetMean(int64_t label) const { return this->m_pfGetMean(label); };
106 
114  double GetMedian(int64_t label) const { return this->m_pfGetMedian(label); };
115 
123  double GetSigma(int64_t label) const { return this->m_pfGetSigma(label); };
124 
132  double GetVariance(int64_t label) const { return this->m_pfGetVariance(label); };
133 
141  double GetSum(int64_t label) const { return this->m_pfGetSum(label); };
142 
150  uint64_t GetCount(int64_t label) const { return this->m_pfGetCount(label); };
151 
159  std::vector<int> GetBoundingBox(int64_t label) const { return this->m_pfGetBoundingBox(label); };
160 
168  std::vector<unsigned int> GetRegion(int64_t label) const { return this->m_pfGetRegion(label); };
169 
176  std::vector<int64_t> GetLabels() const { return this->m_Labels; };
177 
179  std::string GetName() const { return std::string ("LabelStatisticsImageFilter"); }
180 
182  std::string ToString() const;
183 
184 
186  void Execute ( const Image & image, const Image & labelImage );
187 
188 
190  void Execute ( const Image & image, const Image & labelImage, bool useHistograms );
191 
192 
194  bool HasLabel(int64_t label );
195 
197  uint64_t GetNumberOfLabels( );
198 
199 
200  private:
202  typedef void (Self::*MemberFunctionType)( const Image * image, const Image * labelImage );
203 
204  friend struct detail::DualExecuteInternalAddressor<MemberFunctionType>;
205  template <class TImageType1, class TImageType2> void DualExecuteInternal ( const Image * image, const Image * labelImage );
206 
207 
208  nsstd::auto_ptr<detail::DualMemberFunctionFactory<MemberFunctionType> > m_DualMemberFactory;
209 
210 
211 
213 
214  nsstd::function<double(int64_t)> m_pfGetMinimum;
215 
216  nsstd::function<double(int64_t)> m_pfGetMaximum;
217 
218  nsstd::function<double(int64_t)> m_pfGetMean;
219 
220  nsstd::function<double(int64_t)> m_pfGetMedian;
221 
222  nsstd::function<double(int64_t)> m_pfGetSigma;
223 
224  nsstd::function<double(int64_t)> m_pfGetVariance;
225 
226  nsstd::function<double(int64_t)> m_pfGetSum;
227 
228  nsstd::function<uint64_t(int64_t)> m_pfGetCount;
229 
230  nsstd::function<std::vector<int>(int64_t)> m_pfGetBoundingBox;
231 
232  nsstd::function<std::vector<unsigned int>(int64_t)> m_pfGetRegion;
233 
234  std::vector<int64_t> m_Labels;
235 
236  // Holder of process object for active measurements
238  };
239 
240 
241 
242  }
243 }
244 #endif
itk::simple::Image
The main Image class for SimpleITK.
Definition: sitkImage.h:54
sitkBasicFilters.h
itk::simple::LabelStatisticsImageFilter::GetRegion
std::vector< unsigned int > GetRegion(int64_t label) const
Definition: sitkLabelStatisticsImageFilter.h:168
itk::simple::LabelStatisticsImageFilter::GetCount
uint64_t GetCount(int64_t label) const
Definition: sitkLabelStatisticsImageFilter.h:150
itk::simple::LabelStatisticsImageFilter::UseHistogramsOn
Self & UseHistogramsOn()
Definition: sitkLabelStatisticsImageFilter.h:74
itk::simple::LabelStatisticsImageFilter::m_pfGetSigma
nsstd::function< double(int64_t)> m_pfGetSigma
Definition: sitkLabelStatisticsImageFilter.h:222
itk::simple::LabelStatisticsImageFilter::GetVariance
double GetVariance(int64_t label) const
Definition: sitkLabelStatisticsImageFilter.h:132
itk::simple::LabelStatisticsImageFilter::m_pfGetVariance
nsstd::function< double(int64_t)> m_pfGetVariance
Definition: sitkLabelStatisticsImageFilter.h:224
itk::simple::LabelStatisticsImageFilter::GetMinimum
double GetMinimum(int64_t label) const
Definition: sitkLabelStatisticsImageFilter.h:87
itk::simple::LabelStatisticsImageFilter::m_pfGetCount
nsstd::function< uint64_t(int64_t)> m_pfGetCount
Definition: sitkLabelStatisticsImageFilter.h:228
itk::simple::LabelStatisticsImageFilter::m_pfGetBoundingBox
nsstd::function< std::vector< int >int64_t)> m_pfGetBoundingBox
Definition: sitkLabelStatisticsImageFilter.h:230
itk::simple::LabelStatisticsImageFilter::m_pfGetMean
nsstd::function< double(int64_t)> m_pfGetMean
Definition: sitkLabelStatisticsImageFilter.h:218
itk::simple::LabelStatisticsImageFilter::GetMaximum
double GetMaximum(int64_t label) const
Definition: sitkLabelStatisticsImageFilter.h:96
itk::simple::BasicPixelIDTypeList
typelist::MakeTypeList< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t >, BasicPixelID< float >, BasicPixelID< double > >::Type BasicPixelIDTypeList
Definition: sitkPixelIDTypeLists.h:53
sitkImageFilter.h
itk::simple::LabelStatisticsImageFilter
Given an intensity image and a label map, compute min, max, variance and mean of the pixels associate...
Definition: sitkLabelStatisticsImageFilter.h:53
itk::simple::LabelStatisticsImageFilter::m_Filter
itk::ProcessObject * m_Filter
Definition: sitkLabelStatisticsImageFilter.h:237
itk::int64_t
::int64_t int64_t
itk::simple::LabelStatisticsImageFilter::Self
LabelStatisticsImageFilter Self
Definition: sitkLabelStatisticsImageFilter.h:55
itk::uint64_t
::uint64_t uint64_t
itk::simple::LabelStatisticsImageFilter::m_pfGetMedian
nsstd::function< double(int64_t)> m_pfGetMedian
Definition: sitkLabelStatisticsImageFilter.h:220
itk::simple::LabelStatisticsImageFilter::PixelIDTypeList
BasicPixelIDTypeList PixelIDTypeList
Definition: sitkLabelStatisticsImageFilter.h:65
itk::simple::LabelStatisticsImageFilter::m_pfGetMinimum
nsstd::function< double(int64_t)> m_pfGetMinimum
Definition: sitkLabelStatisticsImageFilter.h:214
itk::simple::LabelStatisticsImageFilter::GetMean
double GetMean(int64_t label) const
Definition: sitkLabelStatisticsImageFilter.h:105
sitkDualMemberFunctionFactory.h
SITKBasicFilters_EXPORT
#define SITKBasicFilters_EXPORT
Definition: sitkBasicFilters.h:50
itk::simple::LabelStatisticsImageFilter::GetSigma
double GetSigma(int64_t label) const
Definition: sitkLabelStatisticsImageFilter.h:123
itk::simple::LabelStatisticsImageFilter::SetUseHistograms
Self & SetUseHistograms(bool UseHistograms)
Definition: sitkLabelStatisticsImageFilter.h:71
itk::simple::detail::DualExecuteInternalAddressor
Definition: sitkDetail.h:44
itk::simple::LabelStatisticsImageFilter::GetName
std::string GetName() const
Definition: sitkLabelStatisticsImageFilter.h:179
itk::simple::LabelStatisticsImageFilter::m_Labels
std::vector< int64_t > m_Labels
Definition: sitkLabelStatisticsImageFilter.h:234
itk::simple::LabelStatisticsImageFilter::m_pfGetRegion
nsstd::function< std::vector< unsigned int >int64_t)> m_pfGetRegion
Definition: sitkLabelStatisticsImageFilter.h:232
itk
itk::simple::LabelStatisticsImageFilter::GetSum
double GetSum(int64_t label) const
Definition: sitkLabelStatisticsImageFilter.h:141
itk::simple::LabelStatisticsImageFilter::m_DualMemberFactory
nsstd::auto_ptr< detail::DualMemberFunctionFactory< MemberFunctionType > > m_DualMemberFactory
Definition: sitkLabelStatisticsImageFilter.h:208
itk::simple::LabelStatisticsImageFilter::m_pfGetSum
nsstd::function< double(int64_t)> m_pfGetSum
Definition: sitkLabelStatisticsImageFilter.h:226
itk::ProcessObject
itk::simple::LabelStatisticsImageFilter::m_pfGetMaximum
nsstd::function< double(int64_t)> m_pfGetMaximum
Definition: sitkLabelStatisticsImageFilter.h:216
itk::simple::ImageFilter
The base interface for SimpleITK filters that take one input image.
Definition: sitkImageFilter.h:37
itk::simple::ProcessObject
Base class for SimpleITK classes based on ProcessObject.
Definition: sitkProcessObject.h:50
itk::simple::LabelStatisticsImageFilter::m_UseHistograms
bool m_UseHistograms
Definition: sitkLabelStatisticsImageFilter.h:212
itk::simple::LabelStatisticsImageFilter::GetLabels
std::vector< int64_t > GetLabels() const
Definition: sitkLabelStatisticsImageFilter.h:176
itk::simple::LabelStatisticsImageFilter::UseHistogramsOff
Self & UseHistogramsOff()
Definition: sitkLabelStatisticsImageFilter.h:75
itk::simple::LabelStatisticsImageFilter::GetBoundingBox
std::vector< int > GetBoundingBox(int64_t label) const
Definition: sitkLabelStatisticsImageFilter.h:159
itk::simple::LabelStatisticsImageFilter::GetUseHistograms
bool GetUseHistograms() const
Definition: sitkLabelStatisticsImageFilter.h:79
itk::simple::LabelStatisticsImageFilter::GetMedian
double GetMedian(int64_t label) const
Definition: sitkLabelStatisticsImageFilter.h:114