18 #ifndef sitkShanbhagThresholdImageFilter_h
19 #define sitkShanbhagThresholdImageFilter_h
70 SITK_RETURN_SELF_TYPE_HEADER
SetInsideValue ( uint8_t InsideValue ) { this->m_InsideValue = InsideValue;
return *
this; }
82 SITK_RETURN_SELF_TYPE_HEADER
SetOutsideValue ( uint8_t OutsideValue ) { this->m_OutsideValue = OutsideValue;
return *
this; }
94 SITK_RETURN_SELF_TYPE_HEADER
SetNumberOfHistogramBins ( uint32_t NumberOfHistogramBins ) { this->m_NumberOfHistogramBins = NumberOfHistogramBins;
return *
this; }
103 SITK_RETURN_SELF_TYPE_HEADER
SetMaskOutput (
bool MaskOutput ) { this->m_MaskOutput = MaskOutput;
return *
this; }
106 SITK_RETURN_SELF_TYPE_HEADER
MaskOutputOn() {
return this->SetMaskOutput(
true); }
107 SITK_RETURN_SELF_TYPE_HEADER
MaskOutputOff() {
return this->SetMaskOutput(
false); }
116 SITK_RETURN_SELF_TYPE_HEADER
SetMaskValue ( uint8_t MaskValue ) { this->m_MaskValue = MaskValue;
return *
this; }
131 std::string
GetName()
const {
return std::string (
"ShanbhagThresholdImageFilter"); }
134 std::string ToString()
const;
147 template <
class TImageType>
Image ExecuteInternal (
const Image * image,
const Image * maskImage );
155 uint8_t m_InsideValue{1u};
157 uint8_t m_OutsideValue{0u};
159 uint32_t m_NumberOfHistogramBins{256u};
161 bool m_MaskOutput{
true};
163 uint8_t m_MaskValue{255u};
166 double m_Threshold{0.0};