18 #ifndef sitkIsolatedConnectedImageFilter_h
19 #define sitkIsolatedConnectedImageFilter_h
69 SITK_RETURN_SELF_TYPE_HEADER
SetSeed1 (
const std::vector<unsigned int> & Seed1 ) { this->m_Seed1 = Seed1;
return *
this; }
73 std::vector<unsigned int>
GetSeed1()
const {
return this->m_Seed1; }
78 SITK_RETURN_SELF_TYPE_HEADER
SetSeed2 (
const std::vector<unsigned int> & Seed2 ) { this->m_Seed2 = Seed2;
return *
this; }
82 std::vector<unsigned int>
GetSeed2()
const {
return this->m_Seed2; }
87 SITK_RETURN_SELF_TYPE_HEADER
SetLower (
double Lower ) { this->m_Lower = Lower;
return *
this; }
92 double GetLower()
const {
return this->m_Lower; }
97 SITK_RETURN_SELF_TYPE_HEADER
SetUpper (
double Upper ) { this->m_Upper = Upper;
return *
this; }
107 SITK_RETURN_SELF_TYPE_HEADER
SetReplaceValue (
uint8_t ReplaceValue ) { this->m_ReplaceValue = ReplaceValue;
return *
this; }
117 SITK_RETURN_SELF_TYPE_HEADER
SetIsolatedValueTolerance (
double IsolatedValueTolerance ) { this->m_IsolatedValueTolerance = IsolatedValueTolerance;
return *
this; }
127 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;
165 Image Execute (
const Image& image1,
const std::vector<unsigned int> & seed1,
const std::vector<unsigned int> & seed2,
double lower,
double upper,
uint8_t replaceValue,
double isolatedValueTolerance,
bool findUpperThreshold );
171 typedef Image (Self::*MemberFunctionType)(
const Image& image1 );
172 template <
class TImageType>
Image ExecuteInternal (
const Image& image1 );
204 SITKBasicFilters_EXPORT Image IsolatedConnected (
const Image& image1,
const std::vector<unsigned int> & seed1 = std::vector<unsigned int>(3, 0),
const 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 );
std::vector< unsigned int > GetSeed1() const
BasicPixelIDTypeList PixelIDTypeList
std::string GetName() const
#define SITKBasicFilters_EXPORT
Image IsolatedConnected(const Image &image1, const std::vector< unsigned int > &seed1=std::vector< unsigned int >(3, 0), const 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.
Self & SetSeed1(const std::vector< unsigned int > &Seed1)
typelist::MakeTypeList< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t >, BasicPixelID< float >, BasicPixelID< double > >::Type BasicPixelIDTypeList
bool GetFindUpperThreshold() const
Self & SetReplaceValue(uint8_t ReplaceValue)
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Self & SetLower(double Lower)
bool GetThresholdingFailed() const
uint8_t GetReplaceValue() const
IsolatedConnectedImageFilter Self
Self & FindUpperThresholdOff()
Self & FindUpperThresholdOn()
Self & SetUpper(double Upper)
Self & SetFindUpperThreshold(bool FindUpperThreshold)
Self & SetSeed2(const std::vector< unsigned int > &Seed2)
double GetIsolatedValue() const
The Image class for SimpleITK.
bool m_FindUpperThreshold
bool m_ThresholdingFailed
double m_IsolatedValueTolerance
std::vector< unsigned int > m_Seed1
std::vector< unsigned int > m_Seed2
Self & SetIsolatedValueTolerance(double IsolatedValueTolerance)
Label pixels that are connected to one set of seeds but not another.
The base interface for SimpleITK filters that take one input image.
std::vector< unsigned int > GetSeed2() const
double GetIsolatedValueTolerance() const