SimpleITK  1.0.1
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 
60 
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 
167  std::vector<int64_t> GetLabels() const { return this->m_Labels; };
168 
170  std::string GetName() const { return std::string ("LabelStatisticsImageFilter"); }
171 
173  std::string ToString() const;
174 
175 
177  void Execute ( const Image & image, const Image & labelImage );
178 
179 
181  void Execute ( const Image & image, const Image & labelImage, bool useHistograms );
182 
183 
185  double HasLabel(int64_t label );
186 
188  uint64_t GetNumberOfLabels( );
189 
190 
191  private:
193  typedef void (Self::*MemberFunctionType)( const Image * image, const Image * labelImage );
194 
195  friend struct detail::DualExecuteInternalAddressor<MemberFunctionType>;
196  template <class TImageType1, class TImageType2> void DualExecuteInternal ( const Image * image, const Image * labelImage );
197 
198 
199  nsstd::auto_ptr<detail::DualMemberFunctionFactory<MemberFunctionType> > m_DualMemberFactory;
200 
201 
202 
204 
205  nsstd::function<double(int64_t)> m_pfGetMinimum;
206 
207  nsstd::function<double(int64_t)> m_pfGetMaximum;
208 
209  nsstd::function<double(int64_t)> m_pfGetMean;
210 
211  nsstd::function<double(int64_t)> m_pfGetMedian;
212 
213  nsstd::function<double(int64_t)> m_pfGetSigma;
214 
215  nsstd::function<double(int64_t)> m_pfGetVariance;
216 
217  nsstd::function<double(int64_t)> m_pfGetSum;
218 
219  nsstd::function<uint64_t(int64_t)> m_pfGetCount;
220 
221  nsstd::function<std::vector<int>(int64_t)> m_pfGetBoundingBox;
222 
223  std::vector<int64_t> m_Labels;
224 
225  // Holder of process object for active measurements
227  };
228 
229 
230 
231  }
232 }
233 #endif
#define SITKBasicFilters_EXPORT
nsstd::function< uint64_t(int64_t)> m_pfGetCount
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
nsstd::auto_ptr< detail::DualMemberFunctionFactory< MemberFunctionType > > m_DualMemberFactory
Given an intensity image and a label map, compute min, max, variance and mean of the pixels associate...
The main Image class for SimpleITK.
Definition: sitkImage.h:54
::int64_t int64_t
::uint64_t uint64_t
std::vector< int > GetBoundingBox(int64_t label) const
The base interface for SimpleITK filters that take one input image.