18 #ifndef sitkVotingBinaryImageFilter_h
19 #define sitkVotingBinaryImageFilter_h
69 SITK_RETURN_SELF_TYPE_HEADER
SetRadius (
const std::vector<unsigned int> & Radius ) { this->m_Radius = Radius;
return *
this; }
72 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
SetBirthThreshold (
unsigned int BirthThreshold ) { this->m_BirthThreshold = BirthThreshold;
return *
this; }
93 SITK_RETURN_SELF_TYPE_HEADER
SetSurvivalThreshold (
unsigned int SurvivalThreshold ) { this->m_SurvivalThreshold = SurvivalThreshold;
return *
this; }
103 SITK_RETURN_SELF_TYPE_HEADER
SetForegroundValue (
double ForegroundValue ) { this->m_ForegroundValue = ForegroundValue;
return *
this; }
113 SITK_RETURN_SELF_TYPE_HEADER
SetBackgroundValue (
double BackgroundValue ) { this->m_BackgroundValue = BackgroundValue;
return *
this; }
120 std::string
GetName()
const {
return std::string (
"VotingBinaryImageFilter"); }
123 std::string ToString()
const;
131 Image Execute (
const Image& image1,
const std::vector<unsigned int> & radius,
unsigned int birthThreshold,
unsigned int survivalThreshold,
double foregroundValue,
double backgroundValue );
137 typedef Image (Self::*MemberFunctionType)(
const Image& image1 );
138 template <
class TImageType>
Image ExecuteInternal (
const Image& image1 );
163 SITKBasicFilters_EXPORT Image VotingBinary (
const Image& image1,
const std::vector<unsigned int> & radius = std::vector<unsigned int>(3, 1),
unsigned int birthThreshold = 1u,
unsigned int survivalThreshold = 1u,
double foregroundValue = 1.0,
double backgroundValue = 0.0 );
Self & SetRadius(unsigned int value)
nsstd::auto_ptr< detail::MemberFunctionFactory< MemberFunctionType > > m_MemberFactory
typelist::MakeTypeList< BasicPixelID< int8_t >, BasicPixelID< uint8_t >, BasicPixelID< int16_t >, BasicPixelID< uint16_t >, BasicPixelID< int32_t >, BasicPixelID< uint32_t > >::Type IntegerPixelIDTypeList
#define SITKBasicFilters_EXPORT
std::vector< unsigned int > GetRadius() const
Self & SetBackgroundValue(double BackgroundValue)
unsigned int m_BirthThreshold
Self & SetSurvivalThreshold(unsigned int SurvivalThreshold)
std::string GetName() const
Self & SetBirthThreshold(unsigned int BirthThreshold)
unsigned int GetBirthThreshold() const
Self & SetForegroundValue(double ForegroundValue)
double GetForegroundValue() const
VotingBinaryImageFilter Self
Applies a voting operation in a neighborhood of each pixel.
double GetBackgroundValue() const
The Image class for SimpleITK.
std::vector< unsigned int > m_Radius
IntegerPixelIDTypeList PixelIDTypeList
Self & SetRadius(const std::vector< unsigned int > &Radius)
unsigned int m_SurvivalThreshold
unsigned int GetSurvivalThreshold() const
Image VotingBinary(const Image &image1, const std::vector< unsigned int > &radius=std::vector< unsigned int >(3, 1), unsigned int birthThreshold=1u, unsigned int survivalThreshold=1u, double foregroundValue=1.0, double backgroundValue=0.0)
Applies a voting operation in a neighborhood of each pixel.
The base interface for SimpleITK filters that take one input image.