18 #ifndef sitkNeighborhoodConnectedImageFilter_h
19 #define sitkNeighborhoodConnectedImageFilter_h
61 SITK_RETURN_SELF_TYPE_HEADER
SetLower (
double Lower ) { this->m_Lower = Lower;
return *
this; }
66 double GetLower()
const {
return this->m_Lower; }
71 SITK_RETURN_SELF_TYPE_HEADER
SetUpper (
double Upper ) { this->m_Upper = Upper;
return *
this; }
76 double GetUpper()
const {
return this->m_Upper; }
81 SITK_RETURN_SELF_TYPE_HEADER
SetRadius (
const std::vector<unsigned int> & Radius ) { this->m_Radius = Radius;
return *
this; }
84 SITK_RETURN_SELF_TYPE_HEADER
SetRadius(
unsigned int value ) { this->m_Radius = std::vector<unsigned int>(3, value);
return *
this; }
90 std::vector<unsigned int>
GetRadius()
const {
return this->m_Radius; }
95 SITK_RETURN_SELF_TYPE_HEADER
SetReplaceValue (
double ReplaceValue ) { this->m_ReplaceValue = ReplaceValue;
return *
this; }
102 SITK_RETURN_SELF_TYPE_HEADER
SetSeedList (
const std::vector< std::vector<unsigned int> > &t )
104 this->m_SeedList = t;
return *
this;
110 return this->m_SeedList;
116 this->m_SeedList.clear();
121 SITK_RETURN_SELF_TYPE_HEADER
SetSeed(
const std::vector<unsigned int> &idx )
123 this->m_SeedList.clear();
124 this->m_SeedList.push_back(idx);
129 SITK_RETURN_SELF_TYPE_HEADER
AddSeed(
const std::vector<unsigned int> &idx )
131 this->m_SeedList.push_back(idx);
136 std::string
GetName()
const {
return std::string (
"NeighborhoodConnectedImageFilter"); }
139 std::string ToString()
const;
147 Image Execute (
const Image& image1,
const std::vector< std::vector<unsigned int> > &seedList,
double lower,
double upper,
const std::vector<unsigned int> & radius,
double replaceValue );
153 typedef Image (Self::*MemberFunctionType)(
const Image& image1 );
154 template <
class TImageType>
Image ExecuteInternal (
const Image& image1 );
183 Image SITKBasicFilters_EXPORT NeighborhoodConnected (
const Image& image1,
const std::vector< std::vector<unsigned int> > &seedList,
double lower = 0,
double upper = 1,
const std::vector<unsigned int> & radius = std::vector<unsigned int>(3, 1),
double replaceValue = 1 );
Self & SetSeed(const std::vector< unsigned int > &idx)
NeighborhoodConnectedImageFilter Self
#define SITKBasicFilters_EXPORT
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 & SetLower(double Lower)
std::vector< std::vector< unsigned int > > m_SeedList
std::string GetName() const
double GetReplaceValue() const
BasicPixelIDTypeList PixelIDTypeList
Self & AddSeed(const std::vector< unsigned int > &idx)
std::vector< std::vector< unsigned int > > GetSeedList() const
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Self & SetRadius(unsigned int value)
std::vector< unsigned int > m_Radius
Image NeighborhoodConnected(const Image &image1, const std::vector< std::vector< unsigned int > > &seedList, double lower=0, double upper=1, const std::vector< unsigned int > &radius=std::vector< unsigned int >(3, 1), double replaceValue=1)
Self & SetRadius(const std::vector< unsigned int > &Radius)
The main Image class for SimpleITK.
Self & SetSeedList(const std::vector< std::vector< unsigned int > > &t)
Self & SetReplaceValue(double ReplaceValue)
std::vector< unsigned int > GetRadius() const
Label pixels that are connected to a seed and lie within a neighborhood.
The base interface for SimpleITK filters that take one input image.
Self & SetUpper(double Upper)