18 #ifndef sitkVotingBinaryImageFilter_h
19 #define sitkVotingBinaryImageFilter_h
72 SITK_RETURN_SELF_TYPE_HEADER
SetRadius ( std::vector<unsigned int> Radius ) { this->m_Radius = std::move(Radius);
return *
this; }
75 SITK_RETURN_SELF_TYPE_HEADER
SetRadius(
unsigned int value ) { this->m_Radius = std::vector<unsigned int>(3, value);
return *
this; }
80 std::vector<unsigned int>
GetRadius()
const {
return this->m_Radius; }\
85 SITK_RETURN_SELF_TYPE_HEADER
SetBirthThreshold (
unsigned int BirthThreshold ) { this->m_BirthThreshold = BirthThreshold;
return *
this; }
95 SITK_RETURN_SELF_TYPE_HEADER
SetSurvivalThreshold (
unsigned int SurvivalThreshold ) { this->m_SurvivalThreshold = SurvivalThreshold;
return *
this; }
105 SITK_RETURN_SELF_TYPE_HEADER
SetForegroundValue (
double ForegroundValue ) { this->m_ForegroundValue = ForegroundValue;
return *
this; }
115 SITK_RETURN_SELF_TYPE_HEADER
SetBackgroundValue (
double BackgroundValue ) { this->m_BackgroundValue = BackgroundValue;
return *
this; }
123 std::string
GetName()
const {
return std::string (
"VotingBinaryImageFilter"); }
126 std::string ToString()
const;
138 template <
class TImageType>
Image ExecuteInternal (
const Image& image1 );
147 std::vector<unsigned int> m_Radius{std::vector<unsigned int>(3, 1)};
149 unsigned int m_BirthThreshold{1u};
151 unsigned int m_SurvivalThreshold{1u};
153 double m_ForegroundValue{1.0};
155 double m_BackgroundValue{0.0};
170 SITKBasicFilters_EXPORT Image VotingBinary (
const Image& image1, 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 );