18#ifndef itkWatershedSegmenter_h
19#define itkWatershedSegmenter_h
88template <
typename TInputImage>
98 static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
128 static constexpr short NULL_FLOW = -1;
198 if (reg == m_LargestPossibleRegion)
202 m_LargestPossibleRegion = reg;
210 return m_LargestPossibleRegion;
219 using Superclass::MakeOutput;
239 itkSetClampMacro(Threshold,
double, 0.0, 1.0);
240 itkGetConstMacro(Threshold,
double);
246 itkSetMacro(DoBoundaryAnalysis,
bool);
247 itkGetConstMacro(DoBoundaryAnalysis,
bool);
254 itkGetConstMacro(SortEdgeLists,
bool);
255 itkSetMacro(SortEdgeLists,
bool);
267 bool is_on_boundary{
false };
400 bool m_SortEdgeLists{};
401 bool m_DoBoundaryAnalysis{};
402 double m_Threshold{};
403 double m_MaximumFloodLevel{};
409#ifndef ITK_MANUAL_INSTANTIATION
410# include "itkWatershedSegmenter.hxx"
Base class for all data objects in ITK.
SmartPointer< Self > Pointer
Templated n-dimensional image class.
Control indentation during Print() invocation.
Light weight base class for most itk classes.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
DataObject * GetOutput(const DataObjectIdentifierType &key)
DataObjectPointerArray::size_type DataObjectPointerArraySizeType
virtual void SetNthInput(DataObjectPointerArraySizeType idx, DataObject *input)
DataObject * GetInput(const DataObjectIdentifierType &key)
Return an input.
virtual void SetNthOutput(DataObjectPointerArraySizeType idx, DataObject *output)
typename flat_hash_t::value_type FlatHashValueType
static void MinMax(InputImageTypePointer img, ImageRegionType region, InputPixelType &min, InputPixelType &max)
void DescendFlatRegions(flat_region_table_t &, ImageRegionType)
void PrintSelf(std::ostream &os, Indent indent) const override
typename OutputImageType::Pointer OutputImageTypePointer
SegmentTableType * GetSegmentTable()
void GradientDescent(InputImageTypePointer, ImageRegionType)
std::unordered_map< IdentifierType, edge_table_t > edge_table_hash_t
typename BoundaryType::Pointer BoundaryTypePointer
void SetBoundary(BoundaryType *b)
ImageRegionType GetLargestPossibleRegion() const
static void SetInputImageValues(InputImageTypePointer img, const ImageRegionType region, InputPixelType value)
void SetInputImage(InputImageType *img)
void SetLargestPossibleRegion(ImageRegionType reg)
void LabelMinima(InputImageTypePointer, ImageRegionType, flat_region_table_t &, InputPixelType)
std::map< IdentifierType, InputPixelType > edge_table_t
BoundaryType * GetBoundary()
typename InputImageType::RegionType ImageRegionType
static void Threshold(InputImageTypePointer destination, InputImageTypePointer source, const ImageRegionType source_region, const ImageRegionType destination_region, InputPixelType threshold)
typename InputImageType::PixelType InputPixelType
void UpdateOutputInformation() override
Update the information describing the output data.
OutputImageType * GetOutputImage()
typename BoundaryType::IndexType BoundaryIndexType
static void SetOutputImageValues(OutputImageTypePointer img, const ImageRegionType region, IdentifierType value)
void UpdateSegmentTable(InputImageTypePointer, ImageRegionType)
void operator=(const Self &)
void InitializeBoundary()
std::unordered_map< IdentifierType, flat_region_t > flat_region_table_t
typename InputImageType::Pointer InputImageTypePointer
void BuildRetainingWall(InputImageTypePointer, ImageRegionType, InputPixelType)
DataObjectPointer MakeOutput(DataObjectPointerArraySizeType idx) override
Make a DataObject of the correct type to used as the specified output.
virtual void GenerateConnectivity()
static void RelabelImage(OutputImageTypePointer, ImageRegionType, EquivalencyTable::Pointer)
TInputImage InputImageType
void GenerateOutputRequestedRegion(DataObject *output) override
typename BoundaryType::FlatHashValueType BoundaryFlatHashValueType
void CollectBoundaryInformation(flat_region_table_t &)
void AnalyzeBoundaryFlow(InputImageTypePointer, flat_region_table_t &, InputPixelType)
void SetSegmentTable(SegmentTableType *s)
void GenerateInputRequestedRegion() override
InputImageType * GetInputImage()
static void MergeFlatRegions(flat_region_table_t &, EquivalencyTable::Pointer)
void SetOutputImage(OutputImageType *img)
typename SegmentTableType::Pointer SegmentTableTypePointer
void GenerateData() override
SmartPointer< Self > Pointer
ImageBaseType::RegionType RegionType
ImageBaseType::IndexType IndexType
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
class ITK_FORWARD_EXPORT ProcessObject
SizeValueType IdentifierType
InputImageType::OffsetType * direction
InputPixelType bounds_min
IdentifierType * min_label_ptr