ITK  5.2.0
Insight Toolkit
Classes | Public Types | Static Public Attributes | List of all members

#include <itkWatershedSegmenter.h>

+ Inheritance diagram for itk::watershed::Segmenter< TInputImage >:
+ Collaboration diagram for itk::watershed::Segmenter< TInputImage >:

Classes

struct  connectivity_t
 
struct  flat_region_t
 

Public Types

using BoundaryFlatHashValueType = typename BoundaryType::FlatHashValueType
 
using BoundaryIndexType = typename BoundaryType::IndexType
 
using BoundaryType = Boundary< InputPixelType, Self::ImageDimension >
 
using DataObjectPointer = DataObject::Pointer
 
using ImageRegionType = typename InputImageType::RegionType
 
using InputImageType = TInputImage
 
using InputPixelType = typename InputImageType::PixelType
 
using OutputImageType = Image< IdentifierType, Self::ImageDimension >
 
using SegmentTableType = SegmentTable< InputPixelType >
 
using Self = Segmenter
 
- Public Types inherited from itk::ProcessObject
using ConstPointer = SmartPointer< const Self >
 
using DataObjectIdentifierType = DataObject::DataObjectIdentifierType
 
using DataObjectPointer = DataObject::Pointer
 
using DataObjectPointerArray = std::vector< DataObjectPointer >
 
using DataObjectPointerArraySizeType = DataObjectPointerArray::size_type
 
using MultiThreaderType = MultiThreaderBase
 
using NameArray = std::vector< DataObjectIdentifierType >
 
using Pointer = SmartPointer< Self >
 
using Self = ProcessObject
 
using Superclass = Object
 
- Public Types inherited from itk::Object
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Object
 
using Superclass = LightObject
 
- Public Types inherited from itk::LightObject
using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = LightObject
 

Static Public Attributes

static constexpr unsigned int ImageDimension = TInputImage::ImageDimension
 
using Superclass = ProcessObject
 
using Pointer = SmartPointer< Self >
 
using ConstPointer = SmartPointer< const Self >
 
using InputImageTypePointer = typename InputImageType::Pointer
 
using OutputImageTypePointer = typename OutputImageType::Pointer
 
using SegmentTableTypePointer = typename SegmentTableType::Pointer
 
using BoundaryTypePointer = typename BoundaryType::Pointer
 
using DataObjectPointerArraySizeType = ProcessObject::DataObjectPointerArraySizeType
 
using flat_region_table_t = std::unordered_map< IdentifierType, flat_region_t >
 
using edge_table_t = std::map< IdentifierType, InputPixelType >
 
using edge_table_hash_t = std::unordered_map< IdentifierType, edge_table_t >
 
static constexpr IdentifierType NULL_LABEL = 0
 
static constexpr short NULL_FLOW = -1
 
connectivity_t m_Connectivity
 
ImageRegionType m_LargestPossibleRegion
 
bool m_SortEdgeLists
 
bool m_DoBoundaryAnalysis
 
double m_Threshold
 
double m_MaximumFloodLevel
 
IdentifierType m_CurrentLabel
 
static Pointer New ()
 
static void RelabelImage (OutputImageTypePointer, ImageRegionType, EquivalencyTable::Pointer)
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
InputImageTypeGetInputImage ()
 
void SetInputImage (InputImageType *img)
 
OutputImageTypeGetOutputImage ()
 
void SetOutputImage (OutputImageType *img)
 
SegmentTableTypeGetSegmentTable ()
 
void SetSegmentTable (SegmentTableType *s)
 
BoundaryTypeGetBoundary ()
 
void SetBoundary (BoundaryType *b)
 
void GenerateData () override
 
void SetLargestPossibleRegion (ImageRegionType reg)
 
ImageRegionType GetLargestPossibleRegion () const
 
DataObjectPointer MakeOutput (DataObjectPointerArraySizeType idx) override
 
virtual void SetCurrentLabel (IdentifierType _arg)
 
virtual IdentifierType GetCurrentLabel () const
 
virtual void SetThreshold (double _arg)
 
virtual double GetThreshold () const
 
virtual void SetDoBoundaryAnalysis (bool _arg)
 
virtual bool GetDoBoundaryAnalysis () const
 
virtual bool GetSortEdgeLists () const
 
virtual void SetSortEdgeLists (bool _arg)
 
 Segmenter ()
 
 Segmenter (const Self &)
 
 ~Segmenter () override
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void operator= (const Self &)
 
virtual void GenerateConnectivity ()
 
void GenerateInputRequestedRegion () override
 
void GenerateOutputRequestedRegion (DataObject *output) override
 
void UpdateOutputInformation () override
 
void InitializeBoundary ()
 
void AnalyzeBoundaryFlow (InputImageTypePointer, flat_region_table_t &, InputPixelType)
 
void BuildRetainingWall (InputImageTypePointer, ImageRegionType, InputPixelType)
 
void LabelMinima (InputImageTypePointer, ImageRegionType, flat_region_table_t &, InputPixelType)
 
void GradientDescent (InputImageTypePointer, ImageRegionType)
 
void DescendFlatRegions (flat_region_table_t &, ImageRegionType)
 
void UpdateSegmentTable (InputImageTypePointer, ImageRegionType)
 
void CollectBoundaryInformation (flat_region_table_t &)
 
static void Threshold (InputImageTypePointer destination, InputImageTypePointer source, const ImageRegionType source_region, const ImageRegionType destination_region, InputPixelType threshold)
 
static void MinMax (InputImageTypePointer img, ImageRegionType region, InputPixelType &min, InputPixelType &max)
 
static void MergeFlatRegions (flat_region_table_t &, EquivalencyTable::Pointer)
 
static void SetInputImageValues (InputImageTypePointer img, const ImageRegionType region, InputPixelType value)
 
static void SetOutputImageValues (OutputImageTypePointer img, const ImageRegionType region, IdentifierType value)
 

Additional Inherited Members

- Public Member Functions inherited from itk::ProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual void EnlargeOutputRequestedRegion (DataObject *)
 
virtual const bool & GetAbortGenerateData () const
 
DataObjectPointerArray GetIndexedInputs ()
 
DataObjectPointerArray GetIndexedOutputs ()
 
NameArray GetInputNames () const
 
DataObjectPointerArray GetInputs ()
 
DataObjectPointerArraySizeType GetNumberOfIndexedInputs () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedOutputs () const
 
DataObjectPointerArraySizeType GetNumberOfInputs () const
 
DataObjectPointerArraySizeType GetNumberOfOutputs () const
 
virtual DataObjectPointerArraySizeType GetNumberOfValidRequiredInputs () const
 
NameArray GetOutputNames () const
 
DataObjectPointerArray GetOutputs ()
 
virtual float GetProgress () const
 
NameArray GetRequiredInputNames () const
 
bool HasInput (const DataObjectIdentifierType &key) const
 
bool HasOutput (const DataObjectIdentifierType &key) const
 
void IncrementProgress (float increment)
 
virtual DataObjectPointer MakeOutput (const DataObjectIdentifierType &)
 
virtual void PropagateRequestedRegion (DataObject *output)
 
virtual void ResetPipeline ()
 
virtual void SetAbortGenerateData (bool _arg)
 
virtual void Update ()
 
virtual void UpdateLargestPossibleRegion ()
 
virtual void UpdateOutputData (DataObject *output)
 
void UpdateProgress (float progress)
 
virtual void SetReleaseDataFlag (bool val)
 
virtual bool GetReleaseDataFlag () const
 
void ReleaseDataFlagOn ()
 
void ReleaseDataFlagOff ()
 
virtual void SetReleaseDataBeforeUpdateFlag (bool _arg)
 
virtual const bool & GetReleaseDataBeforeUpdateFlag () const
 
virtual void ReleaseDataBeforeUpdateFlagOn ()
 
virtual void ReleaseDataBeforeUpdateFlagOff ()
 
virtual void SetNumberOfWorkUnits (ThreadIdType _arg)
 
virtual const ThreadIdTypeGetNumberOfWorkUnits () const
 
MultiThreaderTypeGetMultiThreader () const
 
void SetMultiThreader (MultiThreaderType *threader)
 
virtual void PrepareOutputs ()
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
unsigned long AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary ()
 
const MetaDataDictionaryGetMetaDataDictionary () const
 
virtual ModifiedTimeType GetMTime () const
 
virtual const TimeStampGetTimeStamp () const
 
bool HasObserver (const EventObject &event) const
 
void InvokeEvent (const EventObject &)
 
void InvokeEvent (const EventObject &) const
 
virtual void Modified () const
 
void Register () const override
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetReferenceCount (int) override
 
void UnRegister () const noexcept override
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
void SetMetaDataDictionary (MetaDataDictionary &&rrhs)
 
virtual void SetObjectName (std::string _arg)
 
virtual const std::string & GetObjectName () const
 
- Public Member Functions inherited from itk::LightObject
Pointer Clone () const
 
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
void Print (std::ostream &os, Indent indent=0) const
 
- Static Public Member Functions inherited from itk::Object
static bool GetGlobalWarningDisplay ()
 
static void GlobalWarningDisplayOff ()
 
static void GlobalWarningDisplayOn ()
 
static Pointer New ()
 
static void SetGlobalWarningDisplay (bool val)
 
- Static Public Member Functions inherited from itk::LightObject
static void BreakOnError ()
 
static Pointer New ()
 
- Protected Member Functions inherited from itk::ProcessObject
 ProcessObject ()
 
 ~ProcessObject () override
 
DataObjectGetInput (const DataObjectIdentifierType &key)
 
const DataObjectGetInput (const DataObjectIdentifierType &key) const
 
DataObjectGetInput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetInput (DataObjectPointerArraySizeType idx) const
 
virtual void SetInput (const DataObjectIdentifierType &key, DataObject *input)
 
virtual void SetNthInput (DataObjectPointerArraySizeType idx, DataObject *input)
 
virtual void AddInput (DataObject *input)
 
virtual void PushBackInput (const DataObject *input)
 
virtual void PopBackInput ()
 
virtual void PushFrontInput (const DataObject *input)
 
virtual void PopFrontInput ()
 
virtual void RemoveInput (const DataObjectIdentifierType &key)
 
virtual void RemoveInput (DataObjectPointerArraySizeType)
 
DataObjectGetPrimaryInput ()
 
const DataObjectGetPrimaryInput () const
 
virtual void SetPrimaryInputName (const DataObjectIdentifierType &key)
 
virtual const char * GetPrimaryInputName () const
 
virtual void SetPrimaryInput (DataObject *object)
 
void SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num)
 
virtual void SetNumberOfRequiredInputs (DataObjectPointerArraySizeType)
 
virtual const DataObjectPointerArraySizeTypeGetNumberOfRequiredInputs () const
 
bool RemoveRequiredInputName (const DataObjectIdentifierType &)
 
bool IsRequiredInputName (const DataObjectIdentifierType &) const
 
void SetRequiredInputNames (const NameArray &)
 
bool AddRequiredInputName (const DataObjectIdentifierType &)
 
bool AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
void AddOptionalInputName (const DataObjectIdentifierType &)
 
void AddOptionalInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
DataObjectGetOutput (const DataObjectIdentifierType &key)
 
const DataObjectGetOutput (const DataObjectIdentifierType &key) const
 
virtual void SetPrimaryOutputName (const DataObjectIdentifierType &key)
 
virtual const char * GetPrimaryOutputName () const
 
DataObjectGetOutput (DataObjectPointerArraySizeType i)
 
const DataObjectGetOutput (DataObjectPointerArraySizeType i) const
 
virtual void SetOutput (const DataObjectIdentifierType &name, DataObject *output)
 
virtual void RemoveOutput (const DataObjectIdentifierType &key)
 
DataObjectGetPrimaryOutput ()
 
const DataObjectGetPrimaryOutput () const
 
virtual void SetPrimaryOutput (DataObject *object)
 
virtual void SetNthOutput (DataObjectPointerArraySizeType idx, DataObject *output)
 
virtual void AddOutput (DataObject *output)
 
virtual void RemoveOutput (DataObjectPointerArraySizeType idx)
 
virtual void SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg)
 
virtual const DataObjectPointerArraySizeTypeGetNumberOfRequiredOutputs () const
 
void SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num)
 
DataObjectIdentifierType MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const
 
DataObjectIdentifierType MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const
 
DataObjectPointerArraySizeType MakeIndexFromInputName (const DataObjectIdentifierType &name) const
 
DataObjectPointerArraySizeType MakeIndexFromOutputName (const DataObjectIdentifierType &name) const
 
bool IsIndexedInputName (const DataObjectIdentifierType &) const
 
bool IsIndexedOutputName (const DataObjectIdentifierType &) const
 
virtual void VerifyPreconditions () ITKv5_CONST
 
virtual void VerifyInputInformation () ITKv5_CONST
 
virtual void GenerateOutputInformation ()
 
virtual void PropagateResetPipeline ()
 
virtual void ReleaseInputs ()
 
virtual void CacheInputReleaseDataFlags ()
 
virtual void RestoreInputReleaseDataFlags ()
 
virtual bool GetThreaderUpdateProgress () const
 
virtual void ThreaderUpdateProgressOn ()
 
virtual void ThreaderUpdateProgressOff ()
 
virtual void SetThreaderUpdateProgress (bool arg)
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
 ~Object () override
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &timeStamp)
 
- Protected Member Functions inherited from itk::LightObject
virtual LightObject::Pointer InternalClone () const
 
 LightObject ()
 
virtual void PrintHeader (std::ostream &os, Indent indent) const
 
virtual void PrintTrailer (std::ostream &os, Indent indent) const
 
virtual ~LightObject ()
 
- Static Protected Member Functions inherited from itk::ProcessObject
static constexpr float progressFixedToFloat (uint32_t fixed)
 
static uint32_t progressFloatToFixed (float f)
 
- Protected Attributes inherited from itk::ProcessObject
bool m_Updating
 
TimeStamp m_OutputInformationMTime
 
- Protected Attributes inherited from itk::LightObject
std::atomic< int > m_ReferenceCount
 

Detailed Description

template<typename TInputImage>
class itk::watershed::Segmenter< TInputImage >

This filter implements the first step in the N-d watershed segmentation algorithm. It produces a segmented, labeled image from a scalar-valued image input. This filter is used in conjunction with WatershedSegmentTreeGenerator and WatershedRelabeler to produce a final segmented image volume. See itk::WatershedImageFilter for an overview of the entire algorithm and notes on the terminology used in describing it.

The filter is designed to operate in streaming or non-streaming mode. For more information, see the itk::WatershedImageFilter documentation.
Input
There is one input to this algorithm, a real-valued (scalar) itk::Image of arbitrary dimension. The input is assumed to represents a height function, such as a gradient magnitude edge image. The filter can process an image of any dimension. Note that the terms "pixel'' and ``voxel" are interchangeable in this and other watershed component class documentation.
Outputs
There are three potential outputs of this algorithm described below.
The first output is a labeled image of IdentifierType integers. This is an initial segmentation and labeling that is fed into successive components of the watershed algorithm.
The second output is a table of segment information, itk::watershed::SegmentTable. This table is a record of each segment numbered in the initial segmentation (output number one) with relevant information needed in successive stages of the algorithm.
The third output is a data structure containing boundary pixel information, itk::watershed::Boundary. This data is only generated if the flag DoBoundaryAnalysis is set to true and is only useful in streaming applications.
Parameters
Threshold is specified as a percentage (0.0 - 1.0) of the maximum height of the image. This filter thresholds the input image to remove all values below $ L = min + T * (max - min) $, where $ max, min $ are the maximum, minimum values in the image and $ T $ is the threshold parameter value. Values in the image less than $ L $ are raised to $ L $.
Thresholding minimum values in the image decreases the number of local minima in the image and produces an initial segmentation with fewer segments. The assumption is that the "shallow" regions that this thresholding eliminates are generally not of interest.
See also
WatershedImageFilter

Definition at line 89 of file itkWatershedSegmenter.h.

Member Typedef Documentation

◆ BoundaryFlatHashValueType

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::BoundaryFlatHashValueType = typename BoundaryType::FlatHashValueType

Definition at line 105 of file itkWatershedSegmenter.h.

◆ BoundaryIndexType

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::BoundaryIndexType = typename BoundaryType::IndexType

Definition at line 104 of file itkWatershedSegmenter.h.

◆ BoundaryType

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::BoundaryType = Boundary<InputPixelType, Self::ImageDimension>

Definition at line 103 of file itkWatershedSegmenter.h.

◆ BoundaryTypePointer

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::BoundaryTypePointer = typename BoundaryType::Pointer

Methods to implement smart pointers and work with the itk object factory

Definition at line 122 of file itkWatershedSegmenter.h.

◆ ConstPointer

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::ConstPointer = SmartPointer<const Self>

Methods to implement smart pointers and work with the itk object factory

Definition at line 113 of file itkWatershedSegmenter.h.

◆ DataObjectPointer

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::DataObjectPointer = DataObject::Pointer

Definition at line 107 of file itkWatershedSegmenter.h.

◆ DataObjectPointerArraySizeType

Standard itk::ProcessObject subclass method.

Definition at line 218 of file itkWatershedSegmenter.h.

◆ edge_table_hash_t

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::edge_table_hash_t = std::unordered_map<IdentifierType, edge_table_t>
protected

Methods to implement smart pointers and work with the itk object factory

Definition at line 287 of file itkWatershedSegmenter.h.

◆ edge_table_t

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::edge_table_t = std::map<IdentifierType, InputPixelType>
protected

Table for storing tables of edges. This is convenient in generating the segment table, even though the edge tables are stored as ordered lists. An "edge" in this context is synonymous with a segment "adjacency".

Definition at line 285 of file itkWatershedSegmenter.h.

◆ flat_region_table_t

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::flat_region_table_t = std::unordered_map<IdentifierType, flat_region_t>
protected

Table for storing flat region information.

Definition at line 272 of file itkWatershedSegmenter.h.

◆ ImageRegionType

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::ImageRegionType = typename InputImageType::RegionType

Definition at line 101 of file itkWatershedSegmenter.h.

◆ InputImageType

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::InputImageType = TInputImage

Define image types and dimensionality

Definition at line 97 of file itkWatershedSegmenter.h.

◆ InputImageTypePointer

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::InputImageTypePointer = typename InputImageType::Pointer

Typedefs necessary on microsoft VC++ to avoid internal compiler errors

Definition at line 119 of file itkWatershedSegmenter.h.

◆ InputPixelType

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::InputPixelType = typename InputImageType::PixelType

Definition at line 102 of file itkWatershedSegmenter.h.

◆ OutputImageType

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::OutputImageType = Image<IdentifierType, Self::ImageDimension>

Definition at line 100 of file itkWatershedSegmenter.h.

◆ OutputImageTypePointer

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::OutputImageTypePointer = typename OutputImageType::Pointer

Methods to implement smart pointers and work with the itk object factory

Definition at line 120 of file itkWatershedSegmenter.h.

◆ Pointer

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::Pointer = SmartPointer<Self>

Methods to implement smart pointers and work with the itk object factory

Definition at line 112 of file itkWatershedSegmenter.h.

◆ SegmentTableType

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::SegmentTableType = SegmentTable<InputPixelType>

Definition at line 106 of file itkWatershedSegmenter.h.

◆ SegmentTableTypePointer

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::SegmentTableTypePointer = typename SegmentTableType::Pointer

Methods to implement smart pointers and work with the itk object factory

Definition at line 121 of file itkWatershedSegmenter.h.

◆ Self

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::Self = Segmenter

Standard self type alias

Definition at line 94 of file itkWatershedSegmenter.h.

◆ Superclass

template<typename TInputImage>
using itk::watershed::Segmenter< TInputImage >::Superclass = ProcessObject

Methods to implement smart pointers and work with the itk object factory

Definition at line 111 of file itkWatershedSegmenter.h.

Constructor & Destructor Documentation

◆ Segmenter() [1/2]

template<typename TInputImage>
itk::watershed::Segmenter< TInputImage >::Segmenter ( )
protected

Methods to implement smart pointers and work with the itk object factory

◆ Segmenter() [2/2]

template<typename TInputImage>
itk::watershed::Segmenter< TInputImage >::Segmenter ( const Self )
inlineprotected

Methods to implement smart pointers and work with the itk object factory

Definition at line 290 of file itkWatershedSegmenter.h.

◆ ~Segmenter()

template<typename TInputImage>
itk::watershed::Segmenter< TInputImage >::~Segmenter ( )
overrideprotected

Methods to implement smart pointers and work with the itk object factory

Member Function Documentation

◆ AnalyzeBoundaryFlow()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::AnalyzeBoundaryFlow ( InputImageTypePointer  ,
flat_region_table_t ,
InputPixelType   
)
protected

Performs a gradient descent connected component analysis at the boundaries of the images that border other image chunks. Useful only in data streaming applications.

◆ BuildRetainingWall()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::BuildRetainingWall ( InputImageTypePointer  ,
ImageRegionType  ,
InputPixelType   
)
protected

Fills boundary pixels with a specified value. Used by labeling methods to build a very high "wall" around the image so that gradient descent does not need to watch boundaries.

◆ CollectBoundaryInformation()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::CollectBoundaryInformation ( flat_region_table_t )
protected

Traverses each boundary and fills in the data needed for joining streamed chunks of an image volume. Only necessary for streaming applications.

◆ CreateAnother()

template<typename TInputImage>
virtual::itk::LightObject::Pointer itk::watershed::Segmenter< TInputImage >::CreateAnother ( ) const
virtual

Methods to implement smart pointers and work with the itk object factory

Reimplemented from itk::Object.

◆ DescendFlatRegions()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::DescendFlatRegions ( flat_region_table_t ,
ImageRegionType   
)
protected

Associates each flat region with a local minimum and relabels accordingly.

◆ GenerateConnectivity()

template<typename TInputImage>
virtual void itk::watershed::Segmenter< TInputImage >::GenerateConnectivity ( )
protectedvirtual

Constructs the connectivity list and the corresponding set of directional Offset indices.

◆ GenerateData()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::GenerateData ( )
overridevirtual

Standard non-threaded pipeline execution method.

Reimplemented from itk::ProcessObject.

◆ GenerateInputRequestedRegion()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::GenerateInputRequestedRegion ( )
overrideprotectedvirtual

This method asks for an image region that is one pixel larger at each boundary than the region being processed. This single pixel expansion represents an overlap with adjacent image chunks

Reimplemented from itk::ProcessObject.

◆ GenerateOutputRequestedRegion()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::GenerateOutputRequestedRegion ( DataObject output)
overrideprotectedvirtual

Methods to implement smart pointers and work with the itk object factory

Reimplemented from itk::ProcessObject.

◆ GetBoundary()

template<typename TInputImage>
BoundaryType* itk::watershed::Segmenter< TInputImage >::GetBoundary ( )
inline

Returns the boundary information data necessary only for data streaming applications.

Definition at line 174 of file itkWatershedSegmenter.h.

◆ GetCurrentLabel()

template<typename TInputImage>
virtual IdentifierType itk::watershed::Segmenter< TInputImage >::GetCurrentLabel ( ) const
virtual

Methods to implement smart pointers and work with the itk object factory

◆ GetDoBoundaryAnalysis()

template<typename TInputImage>
virtual bool itk::watershed::Segmenter< TInputImage >::GetDoBoundaryAnalysis ( ) const
virtual

Methods to implement smart pointers and work with the itk object factory

◆ GetInputImage()

template<typename TInputImage>
InputImageType* itk::watershed::Segmenter< TInputImage >::GetInputImage ( )
inline

Get/Set the input image.

Definition at line 132 of file itkWatershedSegmenter.h.

◆ GetLargestPossibleRegion()

template<typename TInputImage>
ImageRegionType itk::watershed::Segmenter< TInputImage >::GetLargestPossibleRegion ( ) const
inline

Methods to implement smart pointers and work with the itk object factory

Definition at line 208 of file itkWatershedSegmenter.h.

◆ GetNameOfClass()

template<typename TInputImage>
virtual const char* itk::watershed::Segmenter< TInputImage >::GetNameOfClass ( ) const
virtual

Methods to implement smart pointers and work with the itk object factory

Reimplemented from itk::ProcessObject.

◆ GetOutputImage()

template<typename TInputImage>
OutputImageType* itk::watershed::Segmenter< TInputImage >::GetOutputImage ( )
inline

Get/Set the labeled output image. The output image is always of IdentifierType integers.

Definition at line 146 of file itkWatershedSegmenter.h.

◆ GetSegmentTable()

template<typename TInputImage>
SegmentTableType* itk::watershed::Segmenter< TInputImage >::GetSegmentTable ( )
inline

Get/Set the segment table. The segment table is a table of segmentation information identifying each region produced by the labeling algorithm.

Definition at line 160 of file itkWatershedSegmenter.h.

◆ GetSortEdgeLists()

template<typename TInputImage>
virtual bool itk::watershed::Segmenter< TInputImage >::GetSortEdgeLists ( ) const
virtual

Determines whether the algorithm will sort the adjacencies in its SegmentTable before returning. Default is true. This is an option only useful for streaming applications where the sorting only needs to be done after all iterations have taken place.

◆ GetThreshold()

template<typename TInputImage>
virtual double itk::watershed::Segmenter< TInputImage >::GetThreshold ( ) const
virtual

Methods to implement smart pointers and work with the itk object factory

◆ GradientDescent()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::GradientDescent ( InputImageTypePointer  ,
ImageRegionType   
)
protected

Follows each unlabeled pixel in the image down its path of steepest descent. Each pixel along that path is identified with the local minima already labeled at the end of the path.

◆ InitializeBoundary()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::InitializeBoundary ( )
protected

Allocates boundary structure information and sets the boundary data to null values.

◆ LabelMinima()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::LabelMinima ( InputImageTypePointer  ,
ImageRegionType  ,
flat_region_table_t ,
InputPixelType   
)
protected

Labels all the local minima in the image. Also identifies and labels connected "flat" regions.

◆ MakeOutput()

template<typename TInputImage>
DataObjectPointer itk::watershed::Segmenter< TInputImage >::MakeOutput ( DataObjectPointerArraySizeType  idx)
overridevirtual

Methods to implement smart pointers and work with the itk object factory

Reimplemented from itk::ProcessObject.

◆ MergeFlatRegions()

template<typename TInputImage>
static void itk::watershed::Segmenter< TInputImage >::MergeFlatRegions ( flat_region_table_t ,
EquivalencyTable::Pointer   
)
staticprotected

Helper function. Finds the minimum and maximum values in an image.

◆ MinMax()

template<typename TInputImage>
static void itk::watershed::Segmenter< TInputImage >::MinMax ( InputImageTypePointer  img,
ImageRegionType  region,
InputPixelType min,
InputPixelType max 
)
staticprotected

Helper function. Finds the minimum and maximum values in an image.

◆ New()

template<typename TInputImage>
static Pointer itk::watershed::Segmenter< TInputImage >::New ( )
static

Methods to implement smart pointers and work with the itk object factory

◆ operator=()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::operator= ( const Self )
inlineprotected

Methods to implement smart pointers and work with the itk object factory

Definition at line 296 of file itkWatershedSegmenter.h.

◆ PrintSelf()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

Methods to implement smart pointers and work with the itk object factory

Reimplemented from itk::ProcessObject.

◆ RelabelImage()

template<typename TInputImage>
static void itk::watershed::Segmenter< TInputImage >::RelabelImage ( OutputImageTypePointer  ,
ImageRegionType  ,
EquivalencyTable::Pointer   
)
static

Helper function. Other classes may have occasion to use this. Relabels an image according to a table of equivalencies.

◆ SetBoundary()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::SetBoundary ( BoundaryType b)
inline

Methods to implement smart pointers and work with the itk object factory

Definition at line 180 of file itkWatershedSegmenter.h.

◆ SetCurrentLabel()

template<typename TInputImage>
virtual void itk::watershed::Segmenter< TInputImage >::SetCurrentLabel ( IdentifierType  _arg)
virtual

Gets/Sets the initial label (IdentifierType integer value) used by the labeling algorithm. Only necessary for streaming applications.

◆ SetDoBoundaryAnalysis()

template<typename TInputImage>
virtual void itk::watershed::Segmenter< TInputImage >::SetDoBoundaryAnalysis ( bool  _arg)
virtual

Turns on special labeling of the boundaries for streaming applications. The default value is FALSE, meaning that boundary analysis is turned off.

◆ SetInputImage()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::SetInputImage ( InputImageType img)
inline

Methods to implement smart pointers and work with the itk object factory

Definition at line 138 of file itkWatershedSegmenter.h.

◆ SetInputImageValues()

template<typename TInputImage>
static void itk::watershed::Segmenter< TInputImage >::SetInputImageValues ( InputImageTypePointer  img,
const ImageRegionType  region,
InputPixelType  value 
)
staticprotected

Helper functions for filling in regions with values

◆ SetLargestPossibleRegion()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::SetLargestPossibleRegion ( ImageRegionType  reg)
inline

This method is necessary until the streaming mechanisms of the Itk pipeline are full fleshed out. It is only used for streaming applications. Calling this method gets/sets the image size of the complete volume being streamed. The member variables controlled by this method will not be modified by the Itk pipeline and are necessary for analysis of boundaries.

Definition at line 196 of file itkWatershedSegmenter.h.

◆ SetOutputImage()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::SetOutputImage ( OutputImageType img)
inline

Methods to implement smart pointers and work with the itk object factory

Definition at line 152 of file itkWatershedSegmenter.h.

◆ SetOutputImageValues()

template<typename TInputImage>
static void itk::watershed::Segmenter< TInputImage >::SetOutputImageValues ( OutputImageTypePointer  img,
const ImageRegionType  region,
IdentifierType  value 
)
staticprotected

Methods to implement smart pointers and work with the itk object factory

◆ SetSegmentTable()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::SetSegmentTable ( SegmentTableType s)
inline

Methods to implement smart pointers and work with the itk object factory

Definition at line 166 of file itkWatershedSegmenter.h.

◆ SetSortEdgeLists()

template<typename TInputImage>
virtual void itk::watershed::Segmenter< TInputImage >::SetSortEdgeLists ( bool  _arg)
virtual

Methods to implement smart pointers and work with the itk object factory

◆ SetThreshold()

template<typename TInputImage>
virtual void itk::watershed::Segmenter< TInputImage >::SetThreshold ( double  _arg)
virtual

Gets/Sets the input threshold. Threshold is specified as a percentage (0.0 - 1.0) of the maximum height of the image. This filter thresholds the input image to remove all values below $ L = min + T * (max - min) $, where $ max, min $ are the maximum, minimum values in the image and $ T $ is the threshold parameter value. Values in the image less than $ L $ are raised to $ L $. Thresholding minimum values in the image decreases the number of local minima in the image and produces an initial segmentation with fewer segments. The assumption is that the "shallow" regions that this thresholding eliminates are generally not of interest.

◆ Threshold()

template<typename TInputImage>
static void itk::watershed::Segmenter< TInputImage >::Threshold ( InputImageTypePointer  destination,
InputImageTypePointer  source,
const ImageRegionType  source_region,
const ImageRegionType  destination_region,
InputPixelType  threshold 
)
staticprotected

Helper function. Thresholds low values and copies values from one image into another. The source and destination regions must match in size (not enforced). For integral types, the dynamic range of the image is adjusted such that the maximum value in the image is always at least one less than the maximum value allowed for that data type.

◆ UpdateOutputInformation()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::UpdateOutputInformation ( )
overrideprotectedvirtual

Methods to implement smart pointers and work with the itk object factory

Reimplemented from itk::ProcessObject.

◆ UpdateSegmentTable()

template<typename TInputImage>
void itk::watershed::Segmenter< TInputImage >::UpdateSegmentTable ( InputImageTypePointer  ,
ImageRegionType   
)
protected

Adds entries to the output segment table for all labeled segments in the image.

Member Data Documentation

◆ ImageDimension

template<typename TInputImage>
constexpr unsigned int itk::watershed::Segmenter< TInputImage >::ImageDimension = TInputImage::ImageDimension
staticconstexpr

Definition at line 98 of file itkWatershedSegmenter.h.

◆ m_Connectivity

template<typename TInputImage>
connectivity_t itk::watershed::Segmenter< TInputImage >::m_Connectivity
protected

This is a debugging method. Will be removed. 11/14/01 jc
Holds generalized connectivity information for connected component labeling and gradient descent analysis in pixel neighborhoods.

Definition at line 389 of file itkWatershedSegmenter.h.

◆ m_CurrentLabel

template<typename TInputImage>
IdentifierType itk::watershed::Segmenter< TInputImage >::m_CurrentLabel
private

Methods to implement smart pointers and work with the itk object factory

Definition at line 404 of file itkWatershedSegmenter.h.

◆ m_DoBoundaryAnalysis

template<typename TInputImage>
bool itk::watershed::Segmenter< TInputImage >::m_DoBoundaryAnalysis
private

Methods to implement smart pointers and work with the itk object factory

Definition at line 401 of file itkWatershedSegmenter.h.

◆ m_LargestPossibleRegion

template<typename TInputImage>
ImageRegionType itk::watershed::Segmenter< TInputImage >::m_LargestPossibleRegion
private

Helper, debug method.
This is the actual data set size. The pipeline will alter its LargestPossibleRegion, so we need to preserve it here explicitly for streaming applications

Definition at line 398 of file itkWatershedSegmenter.h.

◆ m_MaximumFloodLevel

template<typename TInputImage>
double itk::watershed::Segmenter< TInputImage >::m_MaximumFloodLevel
private

Methods to implement smart pointers and work with the itk object factory

Definition at line 403 of file itkWatershedSegmenter.h.

◆ m_SortEdgeLists

template<typename TInputImage>
bool itk::watershed::Segmenter< TInputImage >::m_SortEdgeLists
private

Methods to implement smart pointers and work with the itk object factory

Definition at line 400 of file itkWatershedSegmenter.h.

◆ m_Threshold

template<typename TInputImage>
double itk::watershed::Segmenter< TInputImage >::m_Threshold
private

Methods to implement smart pointers and work with the itk object factory

Definition at line 402 of file itkWatershedSegmenter.h.

◆ NULL_FLOW

template<typename TInputImage>
constexpr short itk::watershed::Segmenter< TInputImage >::NULL_FLOW = -1
staticconstexpr

A constant used in the labeling algorithm.

Definition at line 128 of file itkWatershedSegmenter.h.

◆ NULL_LABEL

template<typename TInputImage>
constexpr IdentifierType itk::watershed::Segmenter< TInputImage >::NULL_LABEL = 0
staticconstexpr

A constant used in the labeling algorithm.

Definition at line 125 of file itkWatershedSegmenter.h.


The documentation for this class was generated from the following file: