18 #ifndef itkWatershedImageFilter_h
19 #define itkWatershedImageFilter_h
144 template<
typename TInputImage >
147 TInputImage::ImageDimension > >
159 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
185 void GenerateData()
override;
189 using Superclass::SetInput;
194 if ( input != this->GetInput(0) )
196 m_InputChanged =
true;
202 m_Segmenter->SetInputImage( const_cast< InputImageType * >( input ) );
205 void SetInput(
unsigned int i,
const TInputImage *image)
override
208 { itkExceptionMacro(<<
"Filter has only one input."); }
210 { this->SetInput(image); }
215 void SetThreshold(
double);
217 itkGetConstMacro(Threshold,
double);
221 void SetLevel(
double);
223 itkGetConstMacro(Level,
double);
230 return m_Segmenter->GetOutputImage();
242 void EnlargeOutputRequestedRegion(
DataObject *data)
override;
244 #ifdef ITK_USE_CONCEPT_CHECKING
260 void PrintSelf(std::ostream & os,
Indent indent)
const override;
264 void PrepareOutputs()
override;
270 double m_Threshold{0.0};
298 #ifndef ITK_MANUAL_INSTANTIATION
299 #include "itkWatershedImageFilter.hxx"
virtual void Update()
Bring this filter up-to-date.
A low-level image analysis algorithm that automatically produces a hierarchy of segmented, labeled images from a scalar-valued image input.
watershed::Relabeler< ScalarType, Self::ImageDimension >::Pointer m_Relabeler
TimeStamp m_GenerateDataMTime
Light weight base class for most itk classes.
unsigned long m_ObserverTag
void SetInput(unsigned int i, const TInputImage *image) override
typename InputImageType::PixelType ScalarType
void SetInput(const InputImageType *input) override
watershed::SegmentTreeGenerator< ScalarType >::SegmentTreeType * GetSegmentTree()
TInputImage InputImageType
watershed::SegmentTreeGenerator< ScalarType >::Pointer m_TreeGenerator
ImageBaseType::SizeType SizeType
ImageBaseType::IndexType IndexType
Generate a unique, increasing time value.
typename InputImageType::RegionType RegionType
typename InputImageType::IndexType IndexType
SegmentTreeType * GetOutputSegmentTree()
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
watershed::Segmenter< InputImageType >::Pointer m_Segmenter
virtual void SetNthInput(DataObjectPointerArraySizeType num, DataObject *input)
ImageBaseType::RegionType RegionType
watershed::Segmenter< InputImageType >::OutputImageType * GetBasicSegmentation()
#define itkConceptMacro(name, concept)
typename InputImageType::SizeType SizeType
Base class for all data objects in ITK.
Templated n-dimensional image class.