SimpleITK  
sitkLabelStatisticsImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2*
3* Copyright NumFOCUS
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
33namespace itk::simple {
34
48 public:
50
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
172
174 std::string GetName() const { return std::string ("LabelStatisticsImageFilter"); }
175
177 std::string ToString() const;
178
179
181
182 void Execute ( const Image & image, const Image & labelImage );
183
184
186 bool HasLabel(int64_t label );
187
189 uint64_t GetNumberOfLabels( );
190
191
192 private:
194 using MemberFunctionType = void (Self::*)( const Image * image, const Image * labelImage );
195
197 template <class TImageType1, class TImageType2> void DualExecuteInternal ( const Image * image, const Image * labelImage );
198
199
200 std::unique_ptr<detail::DualMemberFunctionFactory<MemberFunctionType> > m_DualMemberFactory;
201
202
203
204 bool m_UseHistograms{true};
205
206
207 std::function<double(int64_t)> m_pfGetMinimum;
208
209 std::function<double(int64_t)> m_pfGetMaximum;
210
211 std::function<double(int64_t)> m_pfGetMean;
212
213 std::function<double(int64_t)> m_pfGetMedian;
214
215 std::function<double(int64_t)> m_pfGetSigma;
216
217 std::function<double(int64_t)> m_pfGetVariance;
218
219 std::function<double(int64_t)> m_pfGetSum;
220
221 std::function<uint64_t(int64_t)> m_pfGetCount;
222
223 std::function<std::vector<int>(int64_t)> m_pfGetBoundingBox;
224
225 std::function<std::vector<unsigned int>(int64_t)> m_pfGetRegion;
226
227 std::vector<int64_t> m_Labels{std::vector<int64_t>()};
228
229 // Holder of process object for active measurements
231
232 };
233
234
235}
236#endif
The Image class for SimpleITK.
Definition sitkImage.h:77
std::unique_ptr< detail::DualMemberFunctionFactory< MemberFunctionType > > m_DualMemberFactory
void Execute(const Image &image, const Image &labelImage)
std::function< std::vector< int >(int64_t)> m_pfGetBoundingBox
std::vector< unsigned int > GetRegion(int64_t label) const
std::function< std::vector< unsigned int >(int64_t)> m_pfGetRegion
void(Self::*)(const Image *image, const Image *labelImage) MemberFunctionType
std::vector< int > GetBoundingBox(int64_t label) const
void DualExecuteInternal(const Image *image, const Image *labelImage)
typelist2::typelist< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t >, BasicPixelID< float >, BasicPixelID< double > > BasicPixelIDTypeList
#define SITKBasicFilters_EXPORT