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.jinja to make changes.
25 */
26
27#include <memory>
28
29#include "sitkImageFilter.h"
31#include "sitkBasicFilters.h"
33
34namespace itk::simple {
35
54public:
56
59
63
66
67
68
69
72 void
73 SetUseHistograms(bool UseHistograms )
74 { this->m_UseHistograms = UseHistograms; }
75
77 void
78 UseHistogramsOn() { return this->SetUseHistograms(true); }
79 void
80 UseHistogramsOff() { return this->SetUseHistograms(false); }
83 bool
84 GetUseHistograms() const { return this->m_UseHistograms; }
85
86
94 double GetMinimum(int64_t label)const { return this->m_pfGetMinimum(label); }
95
103 double GetMaximum(int64_t label)const { return this->m_pfGetMaximum(label); }
104
112 double GetMean(int64_t label)const { return this->m_pfGetMean(label); }
113
121 double GetMedian(int64_t label)const { return this->m_pfGetMedian(label); }
122
130 double GetSigma(int64_t label)const { return this->m_pfGetSigma(label); }
131
139 double GetVariance(int64_t label)const { return this->m_pfGetVariance(label); }
140
148 double GetSum(int64_t label)const { return this->m_pfGetSum(label); }
149
157 uint64_t GetCount(int64_t label)const { return this->m_pfGetCount(label); }
158
166 std::vector<int> GetBoundingBox(int64_t label)const { return this->m_pfGetBoundingBox(label); }
167
175 std::vector<unsigned int> GetRegion(int64_t label)const { return this->m_pfGetRegion(label); }
176
182 std::vector<int64_t> GetLabels() const { return this->m_Labels; }
183
185 std::string GetName() const { return std::string("LabelStatisticsImageFilter"); }
186
188 std::string ToString() const;
189
190
192 void Execute(const Image &image, const Image &labelImage);
195 int64_t label
196 );
197
200 );
201
202
203private:
204
206 using MemberFunctionType = void (Self::*)(const Image *
207 image, const Image *
208 labelImage);
209
211 template <class TImageType1, class TImageType2> void DualExecuteInternal(const Image *
212 image, const Image *
213 labelImage);
214
215
217
218
219
220 bool m_UseHistograms{ true };
221
222
223
224 std::function<double(int64_t)> m_pfGetMinimum;
225 std::function<double(int64_t)> m_pfGetMaximum;
226 std::function<double(int64_t)> m_pfGetMean;
227 std::function<double(int64_t)> m_pfGetMedian;
228 std::function<double(int64_t)> m_pfGetSigma;
229 std::function<double(int64_t)> m_pfGetVariance;
230 std::function<double(int64_t)> m_pfGetSum;
231 std::function<uint64_t(int64_t)> m_pfGetCount;
232 std::function<std::vector<int>(int64_t)> m_pfGetBoundingBox;
233 std::function<std::vector<unsigned int>(int64_t)> m_pfGetRegion;
234 std::vector<int64_t> m_Labels{ std::vector<int64_t>() };
235
236
237 // Holder of process object for active measurements
238 std::unique_ptr<itk::ProcessObject, ProcessObjectDeleter> m_Filter{nullptr};
239
240
241
242};
243
244
245}
246#endif
The Image class for SimpleITK.
Definition sitkImage.h:77
std::unique_ptr< itk::ProcessObject, ProcessObjectDeleter > m_Filter
static const detail::DualMemberFunctionFactory< MemberFunctionType > & GetMemberFunctionFactory()
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
std::vector< int > GetBoundingBox(int64_t label) const
void(Self::*)(const Image * image, const Image * labelImage) MemberFunctionType
void DualExecuteInternal(const Image *image, const Image *labelImage)
A class used to instantiate and generate function objects of templated member functions with two temp...
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