18 #ifndef sitkIsolatedWatershedImageFilter_h
19 #define sitkIsolatedWatershedImageFilter_h
61 SITK_RETURN_SELF_TYPE_HEADER
SetSeed1 (
const std::vector<uint32_t> & Seed1 ) { this->m_Seed1 = Seed1;
return *
this; }
66 std::vector<uint32_t>
GetSeed1()
const {
return this->m_Seed1; }
71 SITK_RETURN_SELF_TYPE_HEADER
SetSeed2 (
const std::vector<uint32_t> & Seed2 ) { this->m_Seed2 = Seed2;
return *
this; }
76 std::vector<uint32_t>
GetSeed2()
const {
return this->m_Seed2; }
91 SITK_RETURN_SELF_TYPE_HEADER
SetUpperValueLimit (
double UpperValueLimit ) { this->m_UpperValueLimit = UpperValueLimit;
return *
this; }
101 SITK_RETURN_SELF_TYPE_HEADER
SetIsolatedValueTolerance (
double IsolatedValueTolerance ) { this->m_IsolatedValueTolerance = IsolatedValueTolerance;
return *
this; }
111 SITK_RETURN_SELF_TYPE_HEADER
SetReplaceValue1 (
uint8_t ReplaceValue1 ) { this->m_ReplaceValue1 = ReplaceValue1;
return *
this; }
121 SITK_RETURN_SELF_TYPE_HEADER
SetReplaceValue2 (
uint8_t ReplaceValue2 ) { this->m_ReplaceValue2 = ReplaceValue2;
return *
this; }
128 std::string
GetName()
const {
return std::string (
"IsolatedWatershedImageFilter"); }
131 std::string ToString()
const;
139 Image Execute (
const Image& image1,
const std::vector<uint32_t> & seed1,
const std::vector<uint32_t> & seed2,
double threshold,
double upperValueLimit,
double isolatedValueTolerance,
uint8_t replaceValue1,
uint8_t replaceValue2 );
145 typedef Image (Self::*MemberFunctionType)(
const Image& image1 );
146 template <
class TImageType>
Image ExecuteInternal (
const Image& image1 );
174 SITKBasicFilters_EXPORT Image IsolatedWatershed (
const Image& image1,
const std::vector<uint32_t> & seed1 = std::vector<uint32_t>(3, 0),
const std::vector<uint32_t> & seed2 = std::vector<uint32_t>(3, 0),
double threshold = 0.0,
double upperValueLimit = 1.0,
double isolatedValueTolerance = 0.001,
uint8_t replaceValue1 = 1u,
uint8_t replaceValue2 = 2u );
Self & SetThreshold(double Threshold)
IsolatedWatershedImageFilter Self
#define SITKBasicFilters_EXPORT
double GetIsolatedValueTolerance() const
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
Self & SetSeed1(const std::vector< uint32_t > &Seed1)
Self & SetUpperValueLimit(double UpperValueLimit)
Self & SetIsolatedValueTolerance(double IsolatedValueTolerance)
std::vector< uint32_t > GetSeed2() const
Image Threshold(const Image &image1, double lower=0.0, double upper=1.0, double outsideValue=0.0)
Set image values to a user-specified value if they are below, above, or between simple threshold valu...
double GetThreshold() const
std::vector< uint32_t > m_Seed1
std::string GetName() const
Image IsolatedWatershed(const Image &image1, const std::vector< uint32_t > &seed1=std::vector< uint32_t >(3, 0), const std::vector< uint32_t > &seed2=std::vector< uint32_t >(3, 0), double threshold=0.0, double upperValueLimit=1.0, double isolatedValueTolerance=0.001, uint8_t replaceValue1=1u, uint8_t replaceValue2=2u)
Isolate watershed basins using two seeds.
uint8_t GetReplaceValue2() const
std::vector< uint32_t > GetSeed1() const
The Image class for SimpleITK.
double m_IsolatedValueTolerance
uint8_t GetReplaceValue1() const
BasicPixelIDTypeList PixelIDTypeList
Self & SetSeed2(const std::vector< uint32_t > &Seed2)
Isolate watershed basins using two seeds.
Self & SetReplaceValue1(uint8_t ReplaceValue1)
The base interface for SimpleITK filters that take one input image.
double GetUpperValueLimit() const
Self & SetReplaceValue2(uint8_t ReplaceValue2)
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
std::vector< uint32_t > m_Seed2