SimpleITK  
sitkLabelShapeStatisticsImageFilter.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 sitkLabelShapeStatisticsImageFilter_h
19#define sitkLabelShapeStatisticsImageFilter_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 sitkImageFilterTemplate.h.jinja to make changes.
25 */
26
27#include <memory>
28
29#include "sitkBasicFilters.h"
30#include "sitkImageFilter.h"
32
33namespace itk::simple {
34
50public:
52
55
59
62
63
64
65
69 void
70 SetBackgroundValue(double BackgroundValue )
71 { this->m_BackgroundValue = BackgroundValue; }
72
75 double
76 GetBackgroundValue() const { return this->m_BackgroundValue; }
77
78
83 void
84 SetComputeFeretDiameter(bool ComputeFeretDiameter )
85 { this->m_ComputeFeretDiameter = ComputeFeretDiameter; }
86
88 void
90 void
96 bool
98
99
104 void
105 SetComputePerimeter(bool ComputePerimeter )
106 { this->m_ComputePerimeter = ComputePerimeter; }
107
109 void
110 ComputePerimeterOn() { return this->SetComputePerimeter(true); }
111 void
112 ComputePerimeterOff() { return this->SetComputePerimeter(false); }
117 bool
118 GetComputePerimeter() const { return this->m_ComputePerimeter; }
119
120
125 void
126 SetComputeOrientedBoundingBox(bool ComputeOrientedBoundingBox )
127 { this->m_ComputeOrientedBoundingBox = ComputeOrientedBoundingBox; }
128
130 void
132 void
138 bool
140
141
149 std::vector<unsigned int> GetBoundingBox(int64_t label)const { return this->m_pfGetBoundingBox(label); }
150
157 std::vector<unsigned int> GetRegion(int64_t label)const { return this->m_pfGetRegion(label); }
158
165 std::vector<double> GetCentroid(int64_t label)const { return this->m_pfGetCentroid(label); }
166
173 double GetElongation(int64_t label)const { return this->m_pfGetElongation(label); }
174
181 std::vector<double> GetEquivalentEllipsoidDiameter(int64_t label)const { return this->m_pfGetEquivalentEllipsoidDiameter(label); }
182
189 double GetEquivalentSphericalPerimeter(int64_t label)const { return this->m_pfGetEquivalentSphericalPerimeter(label); }
190
197 double GetEquivalentSphericalRadius(int64_t label)const { return this->m_pfGetEquivalentSphericalRadius(label); }
198
205 double GetFeretDiameter(int64_t label)const { return this->m_pfGetFeretDiameter(label); }
206
213 double GetFlatness(int64_t label)const { return this->m_pfGetFlatness(label); }
214
220 std::vector<int64_t> GetLabels() const { return this->m_Labels; }
221
228 uint64_t GetNumberOfPixels(int64_t label)const { return this->m_pfGetNumberOfPixels(label); }
229
236 uint64_t GetNumberOfPixelsOnBorder(int64_t label)const { return this->m_pfGetNumberOfPixelsOnBorder(label); }
237
244 double GetPerimeter(int64_t label)const { return this->m_pfGetPerimeter(label); }
245
252 double GetPerimeterOnBorder(int64_t label)const { return this->m_pfGetPerimeterOnBorder(label); }
253
260 double GetPerimeterOnBorderRatio(int64_t label)const { return this->m_pfGetPerimeterOnBorderRatio(label); }
261
268 double GetPhysicalSize(int64_t label)const { return this->m_pfGetPhysicalSize(label); }
269
276 std::vector<double> GetPrincipalAxes(int64_t label)const { return this->m_pfGetPrincipalAxes(label); }
277
284 std::vector<double> GetPrincipalMoments(int64_t label)const { return this->m_pfGetPrincipalMoments(label); }
285
292 double GetRoundness(int64_t label)const { return this->m_pfGetRoundness(label); }
293
300 std::vector<double> GetOrientedBoundingBoxSize(int64_t label)const { return this->m_pfGetOrientedBoundingBoxSize(label); }
301
308 std::vector<double> GetOrientedBoundingBoxOrigin(int64_t label)const { return this->m_pfGetOrientedBoundingBoxOrigin(label); }
309
316 std::vector<double> GetOrientedBoundingBoxDirection(int64_t label)const { return this->m_pfGetOrientedBoundingBoxDirection(label); }
317
324 std::vector<double> GetOrientedBoundingBoxVertices(int64_t label)const { return this->m_pfGetOrientedBoundingBoxVertices(label); }
325
333 std::vector<unsigned int> GetIndexes(int64_t label)const { return this->m_pfGetIndexes(label); }
334
342 std::vector<unsigned int> GetRLEIndexes(int64_t label)const { return this->m_pfGetRLEIndexes(label); }
343
345 std::string GetName() const { return std::string("LabelShapeStatisticsImageFilter"); }
346
348 std::string ToString() const;
349
350
352 void Execute(const Image &image1);
355 int64_t label
356 );
357
360 );
361
362
363
364private:
366 using MemberFunctionType = void (Self::*)(const Image &image1);
367 template <class TImageType> void ExecuteInternal(const Image &image1);
370
371
372 double m_BackgroundValue{ 0 };
373
375
376 bool m_ComputePerimeter{ true };
377
379
380
381
382 std::function<std::vector<unsigned int>(int64_t)> m_pfGetBoundingBox;
383 std::function<std::vector<unsigned int>(int64_t)> m_pfGetRegion;
384 std::function<std::vector<double>(int64_t)> m_pfGetCentroid;
385 std::function<double(int64_t)> m_pfGetElongation;
386 std::function<std::vector<double>(int64_t)> m_pfGetEquivalentEllipsoidDiameter;
387 std::function<double(int64_t)> m_pfGetEquivalentSphericalPerimeter;
388 std::function<double(int64_t)> m_pfGetEquivalentSphericalRadius;
389 std::function<double(int64_t)> m_pfGetFeretDiameter;
390 std::function<double(int64_t)> m_pfGetFlatness;
391 std::vector<int64_t> m_Labels{ std::vector<int64_t>() };
392 std::function<uint64_t(int64_t)> m_pfGetNumberOfPixels;
393 std::function<uint64_t(int64_t)> m_pfGetNumberOfPixelsOnBorder;
394 std::function<double(int64_t)> m_pfGetPerimeter;
395 std::function<double(int64_t)> m_pfGetPerimeterOnBorder;
396 std::function<double(int64_t)> m_pfGetPerimeterOnBorderRatio;
397 std::function<double(int64_t)> m_pfGetPhysicalSize;
398 std::function<std::vector<double>(int64_t)> m_pfGetPrincipalAxes;
399 std::function<std::vector<double>(int64_t)> m_pfGetPrincipalMoments;
400 std::function<double(int64_t)> m_pfGetRoundness;
401 std::function<std::vector<double>(int64_t)> m_pfGetOrientedBoundingBoxSize;
402 std::function<std::vector<double>(int64_t)> m_pfGetOrientedBoundingBoxOrigin;
403 std::function<std::vector<double>(int64_t)> m_pfGetOrientedBoundingBoxDirection;
404 std::function<std::vector<double>(int64_t)> m_pfGetOrientedBoundingBoxVertices;
405 std::function<std::vector<unsigned int>(int64_t)> m_pfGetIndexes;
406 std::function<std::vector<unsigned int>(int64_t)> m_pfGetRLEIndexes;
407
408
409 // Holder of process object for active measurements
410 std::unique_ptr<itk::ProcessObject, ProcessObjectDeleter> m_Filter{nullptr};
411
412
413
414};
415
416
417}
418#endif
The Image class for SimpleITK.
Definition sitkImage.h:77
void SetComputeOrientedBoundingBox(bool ComputeOrientedBoundingBox)
std::function< std::vector< unsigned int >(int64_t)> m_pfGetBoundingBox
std::function< std::vector< double >(int64_t)> m_pfGetCentroid
std::vector< unsigned int > GetRegion(int64_t label) const
std::function< std::vector< double >(int64_t)> m_pfGetOrientedBoundingBoxVertices
std::vector< unsigned int > GetRLEIndexes(int64_t label) const
std::function< std::vector< double >(int64_t)> m_pfGetPrincipalAxes
std::function< std::vector< double >(int64_t)> m_pfGetEquivalentEllipsoidDiameter
std::function< std::vector< double >(int64_t)> m_pfGetOrientedBoundingBoxDirection
std::unique_ptr< itk::ProcessObject, ProcessObjectDeleter > m_Filter
std::function< std::vector< unsigned int >(int64_t)> m_pfGetRLEIndexes
std::vector< double > GetEquivalentEllipsoidDiameter(int64_t label) const
std::function< std::vector< unsigned int >(int64_t)> m_pfGetRegion
std::function< std::vector< double >(int64_t)> m_pfGetOrientedBoundingBoxOrigin
std::function< std::vector< double >(int64_t)> m_pfGetPrincipalMoments
static const detail::MemberFunctionFactory< MemberFunctionType > & GetMemberFunctionFactory()
std::vector< double > GetPrincipalMoments(int64_t label) const
std::vector< unsigned int > GetBoundingBox(int64_t label) const
std::vector< double > GetOrientedBoundingBoxSize(int64_t label) const
std::function< std::vector< unsigned int >(int64_t)> m_pfGetIndexes
std::vector< double > GetOrientedBoundingBoxDirection(int64_t label) const
std::vector< unsigned int > GetIndexes(int64_t label) const
std::vector< double > GetOrientedBoundingBoxOrigin(int64_t label) const
std::vector< double > GetPrincipalAxes(int64_t label) const
std::vector< double > GetOrientedBoundingBoxVertices(int64_t label) const
void ExecuteInternal(const Image &image1)
std::function< std::vector< double >(int64_t)> m_pfGetOrientedBoundingBoxSize
A class used to instantiate and generate function object to templated member functions.
typelist2::typelist< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t > > IntegerPixelIDTypeList
#define SITKBasicFilters_EXPORT