18 #ifndef sitkVotingBinaryHoleFillingImageFilter_h
19 #define sitkVotingBinaryHoleFillingImageFilter_h
70 SITK_RETURN_SELF_TYPE_HEADER
SetRadius (
const std::vector<unsigned int> & Radius ) { this->m_Radius = Radius;
return *
this; }
73 SITK_RETURN_SELF_TYPE_HEADER
SetRadius(
unsigned int value ) { this->m_Radius = std::vector<unsigned int>(3, value);
return *
this; }
78 std::vector<unsigned int>
GetRadius()
const {
return this->m_Radius; }
83 SITK_RETURN_SELF_TYPE_HEADER
SetMajorityThreshold (
unsigned int MajorityThreshold ) { this->m_MajorityThreshold = MajorityThreshold;
return *
this; }
92 SITK_RETURN_SELF_TYPE_HEADER
SetForegroundValue (
double ForegroundValue ) { this->m_ForegroundValue = ForegroundValue;
return *
this; }
100 SITK_RETURN_SELF_TYPE_HEADER
SetBackgroundValue (
double BackgroundValue ) { this->m_BackgroundValue = BackgroundValue;
return *
this; }
106 std::string
GetName()
const {
return std::string (
"VotingBinaryHoleFillingImageFilter"); }
109 std::string ToString()
const;
117 Image Execute (
const Image& image1,
const std::vector<unsigned int> & radius,
unsigned int majorityThreshold,
double foregroundValue,
double backgroundValue );
123 typedef Image (Self::*MemberFunctionType)(
const Image& image1 );
124 template <
class TImageType>
Image ExecuteInternal (
const Image& image1 );
typelist::MakeTypeList< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t > >::Type IntegerPixelIDTypeList
Self & SetRadius(const std::vector< unsigned int > &Radius)
#define SITKBasicFilters_EXPORT
double GetBackgroundValue() const
VotingBinaryHoleFillingImageFilter Self
std::string GetName() const
unsigned int GetMajorityThreshold() const
unsigned int m_MajorityThreshold
Self & SetMajorityThreshold(unsigned int MajorityThreshold)
std::vector< unsigned int > GetRadius() const
Self & SetForegroundValue(double ForegroundValue)
double GetForegroundValue() const
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
Fills in holes and cavities by applying a voting operation on each pixel.
The Image class for SimpleITK.
std::vector< unsigned int > m_Radius
Image VotingBinaryHoleFilling(const Image &image1, const std::vector< unsigned int > &radius=std::vector< unsigned int >(3, 1), unsigned int majorityThreshold=1u, double foregroundValue=1.0, double backgroundValue=0.0)
Fills in holes and cavities by applying a voting operation on each pixel.
Self & SetBackgroundValue(double BackgroundValue)
Self & SetRadius(unsigned int value)
IntegerPixelIDTypeList PixelIDTypeList
The base interface for SimpleITK filters that take one input image.