18 #ifndef sitkIsolatedConnectedImageFilter_h
19 #define sitkIsolatedConnectedImageFilter_h
69 SITK_RETURN_SELF_TYPE_HEADER
SetSeed1 ( std::vector<unsigned int> Seed1 ) { this->m_Seed1 = std::move(Seed1);
return *
this; }
73 std::vector<unsigned int>
GetSeed1()
const {
return this->m_Seed1; }\
80 SITK_RETURN_SELF_TYPE_HEADER
SetSeed2 ( std::vector<unsigned int> Seed2 ) { this->m_Seed2 = std::move(Seed2);
return *
this; }
84 std::vector<unsigned int>
GetSeed2()
const {
return this->m_Seed2; }\
89 SITK_RETURN_SELF_TYPE_HEADER
SetLower (
double Lower ) { this->m_Lower = Lower;
return *
this; }
94 double GetLower()
const {
return this->m_Lower; }\
99 SITK_RETURN_SELF_TYPE_HEADER
SetUpper (
double Upper ) { this->m_Upper = Upper;
return *
this; }
109 SITK_RETURN_SELF_TYPE_HEADER
SetReplaceValue ( uint8_t ReplaceValue ) { this->m_ReplaceValue = ReplaceValue;
return *
this; }
119 SITK_RETURN_SELF_TYPE_HEADER
SetIsolatedValueTolerance (
double IsolatedValueTolerance ) { this->m_IsolatedValueTolerance = IsolatedValueTolerance;
return *
this; }
129 SITK_RETURN_SELF_TYPE_HEADER
SetFindUpperThreshold (
bool FindUpperThreshold ) { this->m_FindUpperThreshold = FindUpperThreshold;
return *
this; }
157 std::string
GetName()
const {
return std::string (
"IsolatedConnectedImageFilter"); }
160 std::string ToString()
const;
172 template <
class TImageType>
Image ExecuteInternal (
const Image& image1 );
180 std::vector<unsigned int> m_Seed1{std::vector<unsigned int>(3, 0)};
182 std::vector<unsigned int> m_Seed2{std::vector<unsigned int>(3, 0)};
188 uint8_t m_ReplaceValue{1u};
190 double m_IsolatedValueTolerance{1.0};
193 bool m_FindUpperThreshold{
true};
196 bool m_ThresholdingFailed{
false};
198 double m_IsolatedValue{0.0};
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 );