18 #ifndef itkWatershedImageFilter_h
19 #define itkWatershedImageFilter_h
148 template <
typename TInputImage>
150 :
public ImageToImageFilter<TInputImage, Image<IdentifierType, TInputImage::ImageDimension>>
162 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
189 GenerateData()
override;
193 using Superclass::SetInput;
199 if (input != this->GetInput(0))
201 m_InputChanged =
true;
207 m_Segmenter->SetInputImage(const_cast<InputImageType *>(input));
211 SetInput(
unsigned int i,
const TInputImage * image)
override
215 itkExceptionMacro(
"Filter has only one input.");
219 this->SetInput(image);
226 SetThreshold(
double);
228 itkGetConstMacro(Threshold,
double);
235 itkGetConstMacro(Level,
double);
242 return m_Segmenter->GetOutputImage();
255 EnlargeOutputRequestedRegion(
DataObject * data)
override;
257 #ifdef ITK_USE_CONCEPT_CHECKING
270 PrintSelf(std::ostream & os,
Indent indent)
const override;
275 PrepareOutputs()
override;
281 double m_Threshold{ 0.0 };
287 double m_Level{ 0.0 };
299 unsigned long m_ObserverTag{};
301 bool m_LevelChanged{};
302 bool m_ThresholdChanged{};
303 bool m_InputChanged{};
309 #ifndef ITK_MANUAL_INSTANTIATION
310 # include "itkWatershedImageFilter.hxx"