SimpleITK  
sitkIsolatedConnectedImageFilter.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 sitkIsolatedConnectedImageFilter_h
19#define sitkIsolatedConnectedImageFilter_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.in to make changes.
25 */
26
27#include <memory>
28
29#include "sitkBasicFilters.h"
30#include "sitkImageFilter.h"
31
32namespace itk::simple {
33
50 public:
52
55
59
62\
63
69 SITK_RETURN_SELF_TYPE_HEADER SetSeed1 ( std::vector<unsigned int> Seed1 ) { this->m_Seed1 = std::move(Seed1); return *this; }
70
73 std::vector<unsigned int> GetSeed1() const { return this->m_Seed1; }\
74
80 SITK_RETURN_SELF_TYPE_HEADER SetSeed2 ( std::vector<unsigned int> Seed2 ) { this->m_Seed2 = std::move(Seed2); return *this; }
81
84 std::vector<unsigned int> GetSeed2() const { return this->m_Seed2; }\
85
89 SITK_RETURN_SELF_TYPE_HEADER SetLower ( double Lower ) { this->m_Lower = Lower; return *this; }
90
94 double GetLower() const { return this->m_Lower; }\
95
99 SITK_RETURN_SELF_TYPE_HEADER SetUpper ( double Upper ) { this->m_Upper = Upper; return *this; }
100
104 double GetUpper() const { return this->m_Upper; }\
105
109 SITK_RETURN_SELF_TYPE_HEADER SetReplaceValue ( uint8_t ReplaceValue ) { this->m_ReplaceValue = ReplaceValue; return *this; }
110
114 uint8_t GetReplaceValue() const { return this->m_ReplaceValue; }\
115
119 SITK_RETURN_SELF_TYPE_HEADER SetIsolatedValueTolerance ( double IsolatedValueTolerance ) { this->m_IsolatedValueTolerance = IsolatedValueTolerance; return *this; }
120
124 double GetIsolatedValueTolerance() const { return this->m_IsolatedValueTolerance; }\
125
129 SITK_RETURN_SELF_TYPE_HEADER SetFindUpperThreshold ( bool FindUpperThreshold ) { this->m_FindUpperThreshold = FindUpperThreshold; return *this; }
130
132 SITK_RETURN_SELF_TYPE_HEADER FindUpperThresholdOn() { return this->SetFindUpperThreshold(true); }
133 SITK_RETURN_SELF_TYPE_HEADER FindUpperThresholdOff() { return this->SetFindUpperThreshold(false); }
134
138 bool GetFindUpperThreshold() const { return this->m_FindUpperThreshold; }
145 bool GetThresholdingFailed() const { return this->m_ThresholdingFailed; };
146
153 double GetIsolatedValue() const { return this->m_IsolatedValue; };
154
155
157 std::string GetName() const { return std::string ("IsolatedConnectedImageFilter"); }
158
160 std::string ToString() const;
161
162
164
165 Image Execute ( const Image& image1 );
166
167 private:
168
170
171 using MemberFunctionType = Image (Self::*)( const Image& image1 );
172 template <class TImageType> Image ExecuteInternal ( const Image& image1 );
173
174
176
177 std::unique_ptr<detail::MemberFunctionFactory<MemberFunctionType> > m_MemberFactory;
178
179
180 std::vector<unsigned int> m_Seed1{std::vector<unsigned int>(3, 0)};
181
182 std::vector<unsigned int> m_Seed2{std::vector<unsigned int>(3, 0)};
183
184 double m_Lower{0};
185
186 double m_Upper{1};
187
188 uint8_t m_ReplaceValue{1u};
189
191
192 /* */
194
195
197
198 double m_IsolatedValue{0.0};
199
200
201 };
202
212
213 SITKBasicFilters_EXPORT Image IsolatedConnected ( const Image& image1, std::vector<unsigned int> seed1 = std::vector<unsigned int>(3, 0), std::vector<unsigned int> seed2 = std::vector<unsigned int>(3, 0), double lower = 0, double upper = 1, uint8_t replaceValue = 1u, double isolatedValueTolerance = 1.0, bool findUpperThreshold = true );
214
216}
217#endif
The Image class for SimpleITK.
Definition sitkImage.h:77
Image Execute(const Image &image1)
Image ExecuteInternal(const Image &image1)
std::unique_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Self & SetSeed2(std::vector< unsigned int > Seed2)
Self & SetSeed1(std::vector< unsigned int > Seed1)
Self & SetIsolatedValueTolerance(double IsolatedValueTolerance)
Image IsolatedConnected(const Image &image1, std::vector< unsigned int > seed1=std::vector< unsigned int >(3, 0), std::vector< unsigned int > seed2=std::vector< unsigned int >(3, 0), double lower=0, double upper=1, uint8_t replaceValue=1u, double isolatedValueTolerance=1.0, bool findUpperThreshold=true)
Label pixels that are connected to one set of seeds but not another.
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