18 #ifndef sitkDoubleThresholdImageFilter_h
19 #define sitkDoubleThresholdImageFilter_h
66 SITK_RETURN_SELF_TYPE_HEADER
SetThreshold1 (
double Threshold1 ) { this->m_Threshold1 = Threshold1;
return *
this; }
76 SITK_RETURN_SELF_TYPE_HEADER
SetThreshold2 (
double Threshold2 ) { this->m_Threshold2 = Threshold2;
return *
this; }
86 SITK_RETURN_SELF_TYPE_HEADER
SetThreshold3 (
double Threshold3 ) { this->m_Threshold3 = Threshold3;
return *
this; }
96 SITK_RETURN_SELF_TYPE_HEADER
SetThreshold4 (
double Threshold4 ) { this->m_Threshold4 = Threshold4;
return *
this; }
106 SITK_RETURN_SELF_TYPE_HEADER
SetInsideValue ( uint8_t InsideValue ) { this->m_InsideValue = InsideValue;
return *
this; }
116 SITK_RETURN_SELF_TYPE_HEADER
SetOutsideValue ( uint8_t OutsideValue ) { this->m_OutsideValue = OutsideValue;
return *
this; }
126 SITK_RETURN_SELF_TYPE_HEADER
SetFullyConnected (
bool FullyConnected ) { this->m_FullyConnected = FullyConnected;
return *
this; }
138 std::string
GetName()
const {
return std::string (
"DoubleThresholdImageFilter"); }
141 std::string ToString()
const;
153 template <
class TImageType>
Image ExecuteInternal (
const Image& image1 );
161 double m_Threshold1{0.0};
163 double m_Threshold2{1.0};
165 double m_Threshold3{254.0};
167 double m_Threshold4{255.0};
169 uint8_t m_InsideValue{1u};
171 uint8_t m_OutsideValue{0u};
173 bool m_FullyConnected{
false};
188 SITKBasicFilters_EXPORT Image DoubleThreshold (
const Image& image1,
double threshold1 = 0.0,
double threshold2 = 1.0,
double threshold3 = 254.0,
double threshold4 = 255.0, uint8_t insideValue = 1u, uint8_t outsideValue = 0u,
bool fullyConnected =
false );