ITK  5.2.0
Insight Toolkit
Public Types | List of all members

#include <itkWatershedRelabeler.h>

+ Inheritance diagram for itk::watershed::Relabeler< TScalar, TImageDimension >:
+ Collaboration diagram for itk::watershed::Relabeler< TScalar, TImageDimension >:

Public Types

using ConstPointer = SmartPointer< const Self >
 
using Pointer = SmartPointer< Self >
 
using Self = Relabeler
 
using Superclass = ProcessObject
 
- 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
 
using ScalarType = TScalar
 
using ImageType = Image< IdentifierType, TImageDimension >
 
using SegmentTreeType = SegmentTree< ScalarType >
 
using SegmenterType = Segmenter< Image< ScalarType, TImageDimension > >
 
using DataObjectPointer = DataObject::Pointer
 
using DataObjectPointerArraySizeType = ProcessObject::DataObjectPointerArraySizeType
 
static constexpr unsigned int ImageDimension = TImageDimension
 
double m_FloodLevel { 0.0 }
 
static Pointer New ()
 
virtual ::itk::LightObject::Pointer CreateAnother () const
 
virtual const char * GetNameOfClass () const
 
DataObjectPointer MakeOutput (DataObjectPointerArraySizeType idx) override
 
void SetInputImage (ImageType *img)
 
ImageTypeGetInputImage ()
 
void SetOutputImage (ImageType *img)
 
ImageTypeGetOutputImage ()
 
void SetInputSegmentTree (SegmentTreeType *et)
 
SegmentTreeTypeGetInputSegmentTree ()
 
void GenerateData () override
 
virtual void SetFloodLevel (double _arg)
 
virtual double GetFloodLevel () const
 
void GraftOutput (ImageType *graft)
 
void GraftNthOutput (unsigned int idx, ImageType *graft)
 
 Relabeler ()
 
 ~Relabeler () override=default
 
 Relabeler (const Self &)
 
void operator= (const Self &)
 
void PrintSelf (std::ostream &os, Indent indent) const override
 
void GenerateOutputRequestedRegion (DataObject *output) override
 
void GenerateInputRequestedRegion () override
 

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)
 
virtual void UpdateOutputInformation ()
 
void UpdateProgress (float progress)
 
virtual void SetReleaseDataFlag (bool flag)
 
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
virtual void Delete ()
 
virtual int GetReferenceCount () const
 
 itkCloneMacro (Self)
 
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 flag)
 
- 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 num, 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 *input)
 
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 idx)
 
const DataObjectGetOutput (DataObjectPointerArraySizeType idx) const
 
virtual void SetOutput (const DataObjectIdentifierType &key, DataObject *output)
 
virtual void RemoveOutput (const DataObjectIdentifierType &key)
 
DataObjectGetPrimaryOutput ()
 
const DataObjectGetPrimaryOutput () const
 
virtual void SetPrimaryOutput (DataObject *output)
 
virtual void SetNthOutput (DataObjectPointerArraySizeType num, 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 &time)
 
- 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 TScalar, unsigned int TImageDimension>
class itk::watershed::Relabeler< TScalar, TImageDimension >

This filter implements the final step in the watershed segmentation algorithm. It is responsible for relabeling a segmented image according to a specified saliency level (flood level) in a merge tree. (See itk::WatershedImageFilter for information on terminology used in this documentation.)

Inputs
There are two inputs to this filter. The first input is a labeled image of unsigned long integers, such as is produced by itk::watershed::Segmenter. The second input is an itk::watershed::SegmentTree, which is the merge tree data structure produced by the itk::watershed::SegmentTreeGenerator filter. The merge tree represents the hierarchy of merges among adjacent segments in the initial segmentation image.
Output
The output of this filter is a relabeled image of unsigned long integers of dimension and size matching the input.
Parameters
There is a single parameter FloodLevel for this filter. FloodLevel is given in percentage points (0.0 - 1.0) of the maximum saliency found in the merge tree. A FloodLevel of 0.0 will produce an output in which no segments are relabeled (merged). A FloodLevel of 1.0 will produce an output in which all the entries in the merge tree are used to relabel the image. FloodLevel controls which level in the segmentation hierarchy to produce on the output.
See also
itk::WatershedImageFilter
itk::EquivalencyTable
itk::watershed::SegmentTree

Definition at line 65 of file itkWatershedRelabeler.h.

Member Typedef Documentation

◆ ConstPointer

template<typename TScalar, unsigned int TImageDimension>
using itk::watershed::Relabeler< TScalar, TImageDimension >::ConstPointer = SmartPointer<const Self>

Definition at line 73 of file itkWatershedRelabeler.h.

◆ DataObjectPointer

template<typename TScalar, unsigned int TImageDimension>
using itk::watershed::Relabeler< TScalar, TImageDimension >::DataObjectPointer = DataObject::Pointer

Some convenient type alias

Definition at line 88 of file itkWatershedRelabeler.h.

◆ DataObjectPointerArraySizeType

template<typename TScalar, unsigned int TImageDimension>
using itk::watershed::Relabeler< TScalar, TImageDimension >::DataObjectPointerArraySizeType = ProcessObject::DataObjectPointerArraySizeType

Standard itk::ProcessObject subclass method.

Definition at line 91 of file itkWatershedRelabeler.h.

◆ ImageType

template<typename TScalar, unsigned int TImageDimension>
using itk::watershed::Relabeler< TScalar, TImageDimension >::ImageType = Image<IdentifierType, TImageDimension>

Some convenient type alias

Definition at line 85 of file itkWatershedRelabeler.h.

◆ Pointer

template<typename TScalar, unsigned int TImageDimension>
using itk::watershed::Relabeler< TScalar, TImageDimension >::Pointer = SmartPointer<Self>

Definition at line 72 of file itkWatershedRelabeler.h.

◆ ScalarType

template<typename TScalar, unsigned int TImageDimension>
using itk::watershed::Relabeler< TScalar, TImageDimension >::ScalarType = TScalar

Some convenient type alias

Definition at line 84 of file itkWatershedRelabeler.h.

◆ SegmenterType

template<typename TScalar, unsigned int TImageDimension>
using itk::watershed::Relabeler< TScalar, TImageDimension >::SegmenterType = Segmenter<Image<ScalarType, TImageDimension> >

Some convenient type alias

Definition at line 87 of file itkWatershedRelabeler.h.

◆ SegmentTreeType

template<typename TScalar, unsigned int TImageDimension>
using itk::watershed::Relabeler< TScalar, TImageDimension >::SegmentTreeType = SegmentTree<ScalarType>

Some convenient type alias

Definition at line 86 of file itkWatershedRelabeler.h.

◆ Self

template<typename TScalar, unsigned int TImageDimension>
using itk::watershed::Relabeler< TScalar, TImageDimension >::Self = Relabeler

Define smart pointers for this object

Definition at line 70 of file itkWatershedRelabeler.h.

◆ Superclass

template<typename TScalar, unsigned int TImageDimension>
using itk::watershed::Relabeler< TScalar, TImageDimension >::Superclass = ProcessObject

Definition at line 71 of file itkWatershedRelabeler.h.

Constructor & Destructor Documentation

◆ Relabeler() [1/2]

template<typename TScalar, unsigned int TImageDimension>
itk::watershed::Relabeler< TScalar, TImageDimension >::Relabeler ( )
protected

Some convenient type alias

◆ ~Relabeler()

template<typename TScalar, unsigned int TImageDimension>
itk::watershed::Relabeler< TScalar, TImageDimension >::~Relabeler ( )
overrideprotecteddefault

Some convenient type alias

◆ Relabeler() [2/2]

template<typename TScalar, unsigned int TImageDimension>
itk::watershed::Relabeler< TScalar, TImageDimension >::Relabeler ( const Self )
inlineprotected

Some convenient type alias

Definition at line 155 of file itkWatershedRelabeler.h.

Member Function Documentation

◆ CreateAnother()

template<typename TScalar, unsigned int TImageDimension>
virtual::itk::LightObject::Pointer itk::watershed::Relabeler< TScalar, TImageDimension >::CreateAnother ( ) const
virtual

Some convenient type alias

Reimplemented from itk::Object.

◆ GenerateData()

template<typename TScalar, unsigned int TImageDimension>
void itk::watershed::Relabeler< TScalar, TImageDimension >::GenerateData ( )
overridevirtual

Standard non-threaded pipeline method

Reimplemented from itk::ProcessObject.

◆ GenerateInputRequestedRegion()

template<typename TScalar, unsigned int TImageDimension>
void itk::watershed::Relabeler< TScalar, TImageDimension >::GenerateInputRequestedRegion ( )
overrideprotectedvirtual

Some convenient type alias

Reimplemented from itk::ProcessObject.

◆ GenerateOutputRequestedRegion()

template<typename TScalar, unsigned int TImageDimension>
void itk::watershed::Relabeler< TScalar, TImageDimension >::GenerateOutputRequestedRegion ( DataObject output)
overrideprotectedvirtual

Some convenient type alias

Reimplemented from itk::ProcessObject.

◆ GetFloodLevel()

template<typename TScalar, unsigned int TImageDimension>
virtual double itk::watershed::Relabeler< TScalar, TImageDimension >::GetFloodLevel ( ) const
virtual

Some convenient type alias

◆ GetInputImage()

template<typename TScalar, unsigned int TImageDimension>
ImageType* itk::watershed::Relabeler< TScalar, TImageDimension >::GetInputImage ( )
inline

Some convenient type alias

Definition at line 104 of file itkWatershedRelabeler.h.

◆ GetInputSegmentTree()

template<typename TScalar, unsigned int TImageDimension>
SegmentTreeType* itk::watershed::Relabeler< TScalar, TImageDimension >::GetInputSegmentTree ( )
inline

Some convenient type alias

Definition at line 130 of file itkWatershedRelabeler.h.

◆ GetNameOfClass()

template<typename TScalar, unsigned int TImageDimension>
virtual const char* itk::watershed::Relabeler< TScalar, TImageDimension >::GetNameOfClass ( ) const
virtual

Some convenient type alias

Reimplemented from itk::ProcessObject.

◆ GetOutputImage()

template<typename TScalar, unsigned int TImageDimension>
ImageType* itk::watershed::Relabeler< TScalar, TImageDimension >::GetOutputImage ( )
inline

Some convenient type alias

Definition at line 117 of file itkWatershedRelabeler.h.

◆ GraftNthOutput()

template<typename TScalar, unsigned int TImageDimension>
void itk::watershed::Relabeler< TScalar, TImageDimension >::GraftNthOutput ( unsigned int  idx,
ImageType graft 
)

Some convenient type alias

◆ GraftOutput()

template<typename TScalar, unsigned int TImageDimension>
void itk::watershed::Relabeler< TScalar, TImageDimension >::GraftOutput ( ImageType graft)

Standard ProcessObject method used in implementing mini-pipelines

◆ MakeOutput()

template<typename TScalar, unsigned int TImageDimension>
DataObjectPointer itk::watershed::Relabeler< TScalar, TImageDimension >::MakeOutput ( DataObjectPointerArraySizeType  idx)
overridevirtual

Some convenient type alias

Reimplemented from itk::ProcessObject.

◆ New()

template<typename TScalar, unsigned int TImageDimension>
static Pointer itk::watershed::Relabeler< TScalar, TImageDimension >::New ( )
static

Method for creation through the object factory.

◆ operator=()

template<typename TScalar, unsigned int TImageDimension>
void itk::watershed::Relabeler< TScalar, TImageDimension >::operator= ( const Self )
inlineprotected

Some convenient type alias

Definition at line 157 of file itkWatershedRelabeler.h.

◆ PrintSelf()

template<typename TScalar, unsigned int TImageDimension>
void itk::watershed::Relabeler< TScalar, TImageDimension >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
overrideprotectedvirtual

Some convenient type alias

Reimplemented from itk::ProcessObject.

◆ SetFloodLevel()

template<typename TScalar, unsigned int TImageDimension>
virtual void itk::watershed::Relabeler< TScalar, TImageDimension >::SetFloodLevel ( double  _arg)
virtual

Set/Get the percentage of the maximum saliency level to merge to.

◆ SetInputImage()

template<typename TScalar, unsigned int TImageDimension>
void itk::watershed::Relabeler< TScalar, TImageDimension >::SetInputImage ( ImageType img)
inline

Set/Get the input image

Definition at line 98 of file itkWatershedRelabeler.h.

◆ SetInputSegmentTree()

template<typename TScalar, unsigned int TImageDimension>
void itk::watershed::Relabeler< TScalar, TImageDimension >::SetInputSegmentTree ( SegmentTreeType et)
inline

Set/Get the input tree that defines segment merges

Definition at line 124 of file itkWatershedRelabeler.h.

◆ SetOutputImage()

template<typename TScalar, unsigned int TImageDimension>
void itk::watershed::Relabeler< TScalar, TImageDimension >::SetOutputImage ( ImageType img)
inline

Set/Get the output image

Definition at line 111 of file itkWatershedRelabeler.h.

Member Data Documentation

◆ ImageDimension

template<typename TScalar, unsigned int TImageDimension>
constexpr unsigned int itk::watershed::Relabeler< TScalar, TImageDimension >::ImageDimension = TImageDimension
staticconstexpr

Expose the ImageDimension template parameter at run time

Definition at line 81 of file itkWatershedRelabeler.h.

◆ m_FloodLevel

template<typename TScalar, unsigned int TImageDimension>
double itk::watershed::Relabeler< TScalar, TImageDimension >::m_FloodLevel { 0.0 }
protected

Some convenient type alias

Definition at line 162 of file itkWatershedRelabeler.h.


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