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 );
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 );