ITK  4.6.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
itk::watershed::Relabeler< TScalar, TImageDimension > Class Template Reference

#include <itkWatershedRelabeler.h>

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

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 64 of file itkWatershedRelabeler.h.

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef DataObject::Pointer DataObjectPointer
 
typedef
ProcessObject::DataObjectPointerArraySizeType 
DataObjectPointerArraySizeType
 
typedef Image< IdentifierType,
TImageDimension > 
ImageType
 
typedef SmartPointer< SelfPointer
 
typedef TScalar ScalarType
 
typedef Segmenter< Image
< ScalarType, TImageDimension > > 
SegmenterType
 
typedef SegmentTree< ScalarTypeSegmentTreeType
 
typedef Relabeler Self
 
typedef ProcessObject Superclass
 
- Public Types inherited from itk::ProcessObject
typedef SmartPointer< const SelfConstPointer
 
typedef
DataObject::DataObjectIdentifierType 
DataObjectIdentifierType
 
typedef DataObject::Pointer DataObjectPointer
 
typedef std::vector
< DataObjectPointer
DataObjectPointerArray
 
typedef
DataObjectPointerArray::size_type 
DataObjectPointerArraySizeType
 
typedef std::vector
< DataObjectIdentifierType
NameArray
 
typedef SmartPointer< SelfPointer
 
typedef ProcessObject Self
 
typedef Object Superclass
 
- Public Types inherited from itk::Object
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef Object Self
 
typedef LightObject Superclass
 
- Public Types inherited from itk::LightObject
typedef SmartPointer< const SelfConstPointer
 
typedef SmartPointer< SelfPointer
 
typedef LightObject Self
 

Public Member Functions

virtual void GenerateData () ITK_OVERRIDE
 
ImageTypeGetInputImage (void)
 
SegmentTreeTypeGetInputSegmentTree (void)
 
ImageTypeGetOutputImage (void)
 
void GraftNthOutput (unsigned int idx, ImageType *graft)
 
void GraftOutput (ImageType *graft)
 
virtual DataObjectPointer MakeOutput (DataObjectPointerArraySizeType idx) ITK_OVERRIDE
 
void SetInputImage (ImageType *img)
 
void SetInputSegmentTree (SegmentTreeType *et)
 
void SetOutputImage (ImageType *img)
 
virtual void SetFloodLevel (double _arg)
 
virtual double GetFloodLevel () const
 
- Public Member Functions inherited from itk::ProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual void EnlargeOutputRequestedRegion (DataObject *)
 
virtual const bool & GetAbortGenerateData () const
 
NameArray GetInputNames () const
 
MultiThreader * GetMultiThreader () const
 
DataObjectPointerArraySizeType GetNumberOfIndexedInputs () const
 
DataObjectPointerArraySizeType GetNumberOfInputs () const
 
DataObjectPointerArraySizeType GetNumberOfOutputs () const
 
virtual
DataObjectPointerArraySizeType 
GetNumberOfValidRequiredInputs () const
 
NameArray GetOutputNames () const
 
virtual const float & GetProgress () const
 
NameArray GetRequiredInputNames () const
 
bool HasInput (const DataObjectIdentifierType &key) const
 
bool HasOutput (const DataObjectIdentifierType &key) const
 
virtual DataObjectPointer MakeOutput (const DataObjectIdentifierType &)
 
virtual void PrepareOutputs ()
 
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)
 
DataObjectPointerArray GetInputs ()
 
DataObjectPointerArray GetOutputs ()
 
DataObjectPointerArray GetIndexedInputs ()
 
DataObjectPointerArray GetIndexedOutputs ()
 
DataObjectPointerArraySizeType GetNumberOfIndexedOutputs () const
 
void SetProgress (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 SetNumberOfThreads (ThreadIdType _arg)
 
virtual const ThreadIdTypeGetNumberOfThreads () const
 
- Public Member Functions inherited from itk::Object
unsigned long AddObserver (const EventObject &event, Command *)
 
unsigned long AddObserver (const EventObject &event, Command *) const
 
virtual void DebugOff () const
 
virtual void DebugOn () const
 
CommandGetCommand (unsigned long tag)
 
bool GetDebug () const
 
MetaDataDictionaryGetMetaDataDictionary (void)
 
const MetaDataDictionaryGetMetaDataDictionary (void) 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
 
virtual void Register () const ITK_OVERRIDE
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetReferenceCount (int) ITK_OVERRIDE
 
virtual void UnRegister () const ITK_OVERRIDE
 
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 Attributes

static const unsigned int ImageDimension = TImageDimension
 

Protected Member Functions

virtual void GenerateInputRequestedRegion () ITK_OVERRIDE
 
virtual void GenerateOutputRequestedRegion (DataObject *output) ITK_OVERRIDE
 
void operator= (const Self &)
 
virtual void PrintSelf (std::ostream &os, Indent indent) const ITK_OVERRIDE
 
 Relabeler ()
 
 Relabeler (const Self &)
 
virtual ~Relabeler ()
 
- Protected Member Functions inherited from itk::ProcessObject
virtual void AddInput (DataObject *input)
 
virtual void AddOutput (DataObject *output)
 
virtual void CacheInputReleaseDataFlags ()
 
virtual void GenerateOutputInformation ()
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredOutputs () const
 
bool IsIndexedInputName (const DataObjectIdentifierType &) const
 
bool IsIndexedOutputName (const DataObjectIdentifierType &) const
 
 itkLegacyMacro (virtual void RemoveOutput(DataObject *output))
 
 itkLegacyMacro (void SetNumberOfOutputs(DataObjectPointerArraySizeType num))
 
 itkLegacyMacro (virtual void RemoveInput(DataObject *input))
 
 itkLegacyMacro (void SetNumberOfInputs(DataObjectPointerArraySizeType num))
 
DataObjectPointerArraySizeType MakeIndexFromInputName (const DataObjectIdentifierType &name) const
 
DataObjectPointerArraySizeType MakeIndexFromOutputName (const DataObjectIdentifierType &name) const
 
DataObjectIdentifierType MakeNameFromInputIndex (DataObjectPointerArraySizeType idx) const
 
DataObjectIdentifierType MakeNameFromOutputIndex (DataObjectPointerArraySizeType idx) const
 
 ProcessObject ()
 
virtual void PropagateResetPipeline ()
 
virtual void ReleaseInputs ()
 
virtual void RemoveInput (const DataObjectIdentifierType &key)
 
virtual void RemoveInput (DataObjectPointerArraySizeType)
 
virtual void RemoveOutput (const DataObjectIdentifierType &key)
 
virtual void RemoveOutput (DataObjectPointerArraySizeType idx)
 
virtual void RestoreInputReleaseDataFlags ()
 
virtual void SetInput (const DataObjectIdentifierType &key, DataObject *input)
 
virtual void SetNthInput (DataObjectPointerArraySizeType num, DataObject *input)
 
virtual void SetNthOutput (DataObjectPointerArraySizeType num, DataObject *output)
 
void SetNumberOfIndexedInputs (DataObjectPointerArraySizeType num)
 
void SetNumberOfIndexedOutputs (DataObjectPointerArraySizeType num)
 
virtual void SetNumberOfRequiredOutputs (DataObjectPointerArraySizeType _arg)
 
virtual void SetOutput (const DataObjectIdentifierType &key, DataObject *output)
 
virtual void SetPrimaryInput (DataObject *input)
 
virtual void SetPrimaryOutput (DataObject *output)
 
virtual void VerifyInputInformation ()
 
virtual void VerifyPreconditions ()
 
 ~ProcessObject ()
 
DataObjectGetInput (const DataObjectIdentifierType &key)
 
const DataObjectGetInput (const DataObjectIdentifierType &key) const
 
DataObjectGetInput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetInput (DataObjectPointerArraySizeType idx) const
 
virtual void PushBackInput (const DataObject *input)
 
virtual void PopBackInput ()
 
virtual void PushFrontInput (const DataObject *input)
 
virtual void PopFrontInput ()
 
DataObjectGetPrimaryInput ()
 
const DataObjectGetPrimaryInput () const
 
virtual void SetPrimaryInputName (const DataObjectIdentifierType &key)
 
virtual const char * GetPrimaryInputName (void) const
 
virtual void SetNumberOfRequiredInputs (DataObjectPointerArraySizeType)
 
virtual const
DataObjectPointerArraySizeType
GetNumberOfRequiredInputs () const
 
bool AddRequiredInputName (const DataObjectIdentifierType &)
 
bool AddRequiredInputName (const DataObjectIdentifierType &, DataObjectPointerArraySizeType idx)
 
bool RemoveRequiredInputName (const DataObjectIdentifierType &)
 
bool IsRequiredInputName (const DataObjectIdentifierType &) const
 
void SetRequiredInputNames (const NameArray &)
 
DataObjectGetOutput (const DataObjectIdentifierType &key)
 
const DataObjectGetOutput (const DataObjectIdentifierType &key) const
 
virtual void SetPrimaryOutputName (const DataObjectIdentifierType &key)
 
virtual const char * GetPrimaryOutputName (void) const
 
DataObjectGetOutput (DataObjectPointerArraySizeType idx)
 
const DataObjectGetOutput (DataObjectPointerArraySizeType idx) const
 
DataObjectGetPrimaryOutput ()
 
const DataObjectGetPrimaryOutput () const
 
- Protected Member Functions inherited from itk::Object
 Object ()
 
bool PrintObservers (std::ostream &os, Indent indent) const
 
virtual void SetTimeStamp (const TimeStamp &time)
 
virtual ~Object ()
 
- 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 ()
 

Protected Attributes

double m_FloodLevel
 
- Protected Attributes inherited from itk::ProcessObject
TimeStamp m_OutputInformationMTime
 
bool m_Updating
 
- Protected Attributes inherited from itk::LightObject
InternalReferenceCountType m_ReferenceCount
 
SimpleFastMutexLock m_ReferenceCountLock
 
static Pointer New ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 

Additional Inherited Members

- 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 Types inherited from itk::LightObject
typedef int InternalReferenceCountType
 

Member Typedef Documentation

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

Definition at line 72 of file itkWatershedRelabeler.h.

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

Definition at line 87 of file itkWatershedRelabeler.h.

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

Standard itk::ProcessObject subclass method.

Definition at line 90 of file itkWatershedRelabeler.h.

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

Definition at line 84 of file itkWatershedRelabeler.h.

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

Definition at line 71 of file itkWatershedRelabeler.h.

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

Some convenient typedefs

Definition at line 83 of file itkWatershedRelabeler.h.

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

Definition at line 86 of file itkWatershedRelabeler.h.

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

Definition at line 85 of file itkWatershedRelabeler.h.

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

Define smart pointers for this object

Definition at line 69 of file itkWatershedRelabeler.h.

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

Definition at line 70 of file itkWatershedRelabeler.h.

Constructor & Destructor Documentation

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

Definition at line 146 of file itkWatershedRelabeler.h.

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

Definition at line 147 of file itkWatershedRelabeler.h.

Member Function Documentation

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

Method for creation through the object factory.

Reimplemented from itk::Object.

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

Standard non-threaded pipeline method

Reimplemented from itk::ProcessObject.

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

What is the input requested region that is required to produce the output requested region? By default, the largest possible region is always required but this is overridden in many subclasses. For instance, for an image processing filter where an output pixel is a simple function of an input pixel, the input requested region will be set to the output requested region. For an image processing filter where an output pixel is a function of the pixels in a neighborhood of an input pixel, then the input requested region will need to be larger than the output requested region (to avoid introducing artificial boundary conditions). This function should never request an input region that is outside the the input largest possible region (i.e. implementations of this method should crop the input requested region at the boundaries of the input largest possible region).

Reimplemented from itk::ProcessObject.

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

Given one output whose requested region has been set, how should the requested regions for the remaining outputs of the process object be set? By default, all the outputs are set to the same requested region. If a filter needs to produce different requested regions for each output, for instance an image processing filter producing several outputs at different resolutions, then that filter may override this method and set the requested regions appropriatedly.

Note that a filter producing multiple outputs of different types is required to override this method. The default implementation can only correctly handle multiple outputs of the same type.

Reimplemented from itk::ProcessObject.

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

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

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

Definition at line 100 of file itkWatershedRelabeler.h.

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

Definition at line 124 of file itkWatershedRelabeler.h.

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

Method for creation through the object factory.

Reimplemented from itk::ProcessObject.

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

Definition at line 112 of file itkWatershedRelabeler.h.

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

Standard ProcessObject method used in implementing mini-pipelines

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

Make a DataObject of the correct type to used as the specified output. Every ProcessObject subclass must be able to create a DataObject that can be used as a specified output. This method is automatically called when DataObject::DisconnectPipeline() is called. DataObject::DisconnectPipeline, disconnects a data object from being an output of its current source. When the data object is disconnected, the ProcessObject needs to construct a replacement output data object so that the ProcessObject is in a valid state. So DataObject::DisconnectPipeline eventually calls ProcessObject::MakeOutput. Note that MakeOutput always returns a itkSmartPointer to a DataObject. ImageSource and MeshSource override this method to create the correct type of image and mesh respectively. If a filter has multiple outputs of different types, then that filter must provide an implementation of MakeOutput().

Reimplemented from itk::ProcessObject.

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

Method for creation through the object factory.

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

Definition at line 148 of file itkWatershedRelabeler.h.

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

Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from itk::ProcessObject.

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.

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

Set/Get the input image

Definition at line 95 of file itkWatershedRelabeler.h.

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 119 of file itkWatershedRelabeler.h.

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

Set/Get the output image

Definition at line 107 of file itkWatershedRelabeler.h.

Member Data Documentation

template<typename TScalar, unsigned int TImageDimension>
const unsigned int itk::watershed::Relabeler< TScalar, TImageDimension >::ImageDimension = TImageDimension
static

Expose the ImageDimension template parameter at run time

Definition at line 80 of file itkWatershedRelabeler.h.

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

Definition at line 151 of file itkWatershedRelabeler.h.


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