SimpleITK  1.3.0.dev466
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 
48  public:
50 
52  virtual ~LabelStatisticsImageFilter();
53 
57 
60 
61 
62 
65  SITK_RETURN_SELF_TYPE_HEADER SetUseHistograms ( bool UseHistograms ) { this->m_UseHistograms = UseHistograms; return *this; }
66 
68  SITK_RETURN_SELF_TYPE_HEADER UseHistogramsOn() { return this->SetUseHistograms(true); }
69  SITK_RETURN_SELF_TYPE_HEADER UseHistogramsOff() { return this->SetUseHistograms(false); }
70 
73  bool GetUseHistograms() const { return this->m_UseHistograms; }
81  double GetMinimum(int64_t label) const { return this->m_pfGetMinimum(label); };
82 
90  double GetMaximum(int64_t label) const { return this->m_pfGetMaximum(label); };
91 
99  double GetMean(int64_t label) const { return this->m_pfGetMean(label); };
100 
108  double GetMedian(int64_t label) const { return this->m_pfGetMedian(label); };
109 
117  double GetSigma(int64_t label) const { return this->m_pfGetSigma(label); };
118 
126  double GetVariance(int64_t label) const { return this->m_pfGetVariance(label); };
127 
135  double GetSum(int64_t label) const { return this->m_pfGetSum(label); };
136 
144  uint64_t GetCount(int64_t label) const { return this->m_pfGetCount(label); };
145 
153  std::vector<int> GetBoundingBox(int64_t label) const { return this->m_pfGetBoundingBox(label); };
154 
162  std::vector<unsigned int> GetRegion(int64_t label) const { return this->m_pfGetRegion(label); };
163 
170  std::vector<int64_t> GetLabels() const { return this->m_Labels; };
171 
173  std::string GetName() const { return std::string ("LabelStatisticsImageFilter"); }
174 
176  std::string ToString() const;
177 
178 
180  void Execute ( const Image & image, const Image & labelImage );
181 
182 
184  void Execute ( const Image & image, const Image & labelImage, bool useHistograms );
185 
186 
188  bool HasLabel(int64_t label );
189 
191  uint64_t GetNumberOfLabels( );
192 
193 
194  private:
196  typedef void (Self::*MemberFunctionType)( const Image * image, const Image * labelImage );
197 
198  friend struct detail::DualExecuteInternalAddressor<MemberFunctionType>;
199  template <class TImageType1, class TImageType2> void DualExecuteInternal ( const Image * image, const Image * labelImage );
200 
201 
202  nsstd::auto_ptr<detail::DualMemberFunctionFactory<MemberFunctionType> > m_DualMemberFactory;
203 
204 
205 
207 
208  nsstd::function<double(int64_t)> m_pfGetMinimum;
209 
210  nsstd::function<double(int64_t)> m_pfGetMaximum;
211 
212  nsstd::function<double(int64_t)> m_pfGetMean;
213 
214  nsstd::function<double(int64_t)> m_pfGetMedian;
215 
216  nsstd::function<double(int64_t)> m_pfGetSigma;
217 
218  nsstd::function<double(int64_t)> m_pfGetVariance;
219 
220  nsstd::function<double(int64_t)> m_pfGetSum;
221 
222  nsstd::function<uint64_t(int64_t)> m_pfGetCount;
223 
224  nsstd::function<std::vector<int>(int64_t)> m_pfGetBoundingBox;
225 
226  nsstd::function<std::vector<unsigned int>(int64_t)> m_pfGetRegion;
227 
228  std::vector<int64_t> m_Labels;
229 
230  // Holder of process object for active measurements
232  };
233 
234 
235 
236  }
237 }
238 #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...
std::vector< unsigned int > GetRegion(int64_t label) const
The Image class for SimpleITK.
Definition: sitkImage.h:78
::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.