18 #ifndef sitkIsolatedConnectedImageFilter_h
19 #define sitkIsolatedConnectedImageFilter_h
68 SITK_RETURN_SELF_TYPE_HEADER
SetSeed1 ( std::vector<unsigned int> Seed1 ) { this->m_Seed1 = std::move(Seed1);
return *
this; }
72 std::vector<unsigned int>
GetSeed1()
const {
return this->m_Seed1; }\
77 SITK_RETURN_SELF_TYPE_HEADER
SetSeed2 ( std::vector<unsigned int> Seed2 ) { this->m_Seed2 = std::move(Seed2);
return *
this; }
81 std::vector<unsigned int>
GetSeed2()
const {
return this->m_Seed2; }\
86 SITK_RETURN_SELF_TYPE_HEADER
SetLower (
double Lower ) { this->m_Lower = Lower;
return *
this; }
91 double GetLower()
const {
return this->m_Lower; }\
96 SITK_RETURN_SELF_TYPE_HEADER
SetUpper (
double Upper ) { this->m_Upper = Upper;
return *
this; }
106 SITK_RETURN_SELF_TYPE_HEADER
SetReplaceValue (
uint8_t ReplaceValue ) { this->m_ReplaceValue = ReplaceValue;
return *
this; }
116 SITK_RETURN_SELF_TYPE_HEADER
SetIsolatedValueTolerance (
double IsolatedValueTolerance ) { this->m_IsolatedValueTolerance = IsolatedValueTolerance;
return *
this; }
126 SITK_RETURN_SELF_TYPE_HEADER
SetFindUpperThreshold (
bool FindUpperThreshold ) { this->m_FindUpperThreshold = FindUpperThreshold;
return *
this; }
154 std::string
GetName()
const {
return std::string (
"IsolatedConnectedImageFilter"); }
157 std::string ToString()
const;
169 template <
class TImageType>
Image ExecuteInternal (
const Image& image1 );
177 std::vector<unsigned int> m_Seed1{std::vector<unsigned int>(3, 0)};
179 std::vector<unsigned int> m_Seed2{std::vector<unsigned int>(3, 0)};
187 double m_IsolatedValueTolerance{1.0};
190 bool m_FindUpperThreshold{
true};
193 bool m_ThresholdingFailed{
false};
195 double m_IsolatedValue{0.0};
210 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 );