ITK  4.4.0
Insight Segmentation and Registration Toolkit
Classes | Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Attributes | List of all members
itk::watershed::Segmenter< TInputImage > Class Template Reference

#include <itkWatershedSegmenter.h>

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

Detailed Description

template<class 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'' andvoxel'' 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 88 of file itkWatershedSegmenter.h.

Classes

struct  connectivity_t
 
struct  flat_region_t
 

Public Types

typedef
BoundaryType::FlatHashValueType 
BoundaryFlatHashValueType
 
typedef BoundaryType::IndexType BoundaryIndexType
 
typedef Boundary
< InputPixelType,
itkGetStaticConstMacro(ImageDimension) > 
BoundaryType
 
typedef BoundaryType::Pointer BoundaryTypePointer
 
typedef DataObject::Pointer DataObjectPointer
 
typedef
ProcessObject::DataObjectPointerArraySizeType 
DataObjectPointerArraySizeType
 
typedef InputImageType::RegionType ImageRegionType
 
typedef TInputImage InputImageType
 
typedef InputImageType::Pointer InputImageTypePointer
 
typedef InputImageType::PixelType InputPixelType
 
typedef Image< IdentifierType,
itkGetStaticConstMacro(ImageDimension) > 
OutputImageType
 
typedef OutputImageType::Pointer OutputImageTypePointer
 
typedef SegmentTable
< InputPixelType
SegmentTableType
 
typedef SegmentTableType::Pointer SegmentTableTypePointer
 
typedef Segmenter Self
 
- 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

void GenerateData ()
 
BoundaryTypeGetBoundary (void)
 
InputImageTypeGetInputImage (void)
 
ImageRegionType GetLargestPossibleRegion () const
 
OutputImageTypeGetOutputImage (void)
 
SegmentTableTypeGetSegmentTable (void)
 
virtual DataObjectPointer MakeOutput (DataObjectPointerArraySizeType idx)
 
void SetBoundary (BoundaryType *b)
 
void SetInputImage (InputImageType *img)
 
void SetOutputImage (OutputImageType *img)
 
void SetSegmentTable (SegmentTableType *s)
 
void SetLargestPossibleRegion (ImageRegionType reg)
 
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)
 
- Public Member Functions inherited from itk::ProcessObject
virtual void AbortGenerateDataOff ()
 
virtual void AbortGenerateDataOn ()
 
virtual void EnlargeOutputRequestedRegion (DataObject *)
 
virtual const bool & GetAbortGenerateData ()
 
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 ()
 
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 SetProgress (float _arg)
 
virtual void Update ()
 
virtual void UpdateLargestPossibleRegion ()
 
virtual void UpdateOutputData (DataObject *output)
 
void UpdateProgress (float amount)
 
DataObjectPointerArray GetInputs ()
 
DataObjectPointerArray GetOutputs ()
 
DataObjectPointerArray GetIndexedInputs ()
 
DataObjectPointerArray GetIndexedOutputs ()
 
DataObjectPointerArraySizeType GetNumberOfIndexedOutputs () const
 
virtual void SetReleaseDataFlag (bool flag)
 
virtual bool GetReleaseDataFlag () const
 
void ReleaseDataFlagOn ()
 
void ReleaseDataFlagOff ()
 
virtual void SetReleaseDataBeforeUpdateFlag (bool _arg)
 
virtual const bool & GetReleaseDataBeforeUpdateFlag ()
 
virtual void ReleaseDataBeforeUpdateFlagOn ()
 
virtual void ReleaseDataBeforeUpdateFlagOff ()
 
virtual void SetNumberOfThreads (ThreadIdType _arg)
 
virtual const ThreadIdTypeGetNumberOfThreads ()
 
- 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
 
void RemoveAllObservers ()
 
void RemoveObserver (unsigned long tag)
 
void SetDebug (bool debugFlag) const
 
void SetMetaDataDictionary (const MetaDataDictionary &rhs)
 
virtual void SetReferenceCount (int)
 
virtual void UnRegister () 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

static void RelabelImage (OutputImageTypePointer, ImageRegionType, EquivalencyTable::Pointer)
 

Static Public Attributes

static const unsigned int ImageDimension = TInputImage::ImageDimension
 
static const unsigned long NULL_FLOW = -1
 
static const unsigned long NULL_LABEL = 0
 

Protected Types

typedef itksys::hash_map
< IdentifierType, edge_table_t,
itksys::hash< IdentifierType > > 
edge_table_hash_t
 
typedef itksys::hash_map
< IdentifierType,
InputPixelType, itksys::hash
< IdentifierType > > 
edge_table_t
 
typedef itksys::hash_map
< IdentifierType,
flat_region_t, itksys::hash
< IdentifierType > > 
flat_region_table_t
 

Protected Member Functions

void AnalyzeBoundaryFlow (InputImageTypePointer, flat_region_table_t &, InputPixelType)
 
void BuildRetainingWall (InputImageTypePointer, ImageRegionType, InputPixelType)
 
void CollectBoundaryInformation (flat_region_table_t &)
 
void DescendFlatRegions (flat_region_table_t &, ImageRegionType)
 
virtual void GenerateConnectivity ()
 
void GenerateInputRequestedRegion ()
 
void GenerateOutputRequestedRegion (DataObject *output)
 
void GradientDescent (InputImageTypePointer, ImageRegionType)
 
void InitializeBoundary ()
 
void LabelMinima (InputImageTypePointer, ImageRegionType, flat_region_table_t &, InputPixelType)
 
void operator= (const Self &)
 
void PrintSelf (std::ostream &os, Indent indent) const
 
 Segmenter ()
 
 Segmenter (const Self &)
 
void UpdateOutputInformation ()
 
void UpdateSegmentTable (InputImageTypePointer, ImageRegionType)
 
virtual ~Segmenter ()
 
- 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 ()
 
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 ()
 
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 ()
 

Static Protected Member Functions

static void MergeFlatRegions (flat_region_table_t &, EquivalencyTable::Pointer)
 
static void MinMax (InputImageTypePointer img, ImageRegionType region, InputPixelType &min, InputPixelType &max)
 
static void SetInputImageValues (InputImageTypePointer img, const ImageRegionType region, InputPixelType value)
 
static void SetOutputImageValues (OutputImageTypePointer img, const ImageRegionType region, IdentifierType value)
 
static void Threshold (InputImageTypePointer destination, InputImageTypePointer source, const ImageRegionType source_region, const ImageRegionType destination_region, InputPixelType threshold)
 

Protected Attributes

connectivity_t m_Connectivity
 
- Protected Attributes inherited from itk::ProcessObject
TimeStamp m_OutputInformationMTime
 
bool m_Updating
 

Private Attributes

IdentifierType m_CurrentLabel
 
bool m_DoBoundaryAnalysis
 
ImageRegionType m_LargestPossibleRegion
 
double m_MaximumFloodLevel
 
bool m_SortEdgeLists
 
double m_Threshold
 
typedef ProcessObject Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
static Pointer New ()
 
virtual ::itk::LightObject::Pointer CreateAnother (void) const
 
virtual const char * GetNameOfClass () const
 

Member Typedef Documentation

template<class TInputImage>
typedef BoundaryType::FlatHashValueType itk::watershed::Segmenter< TInputImage >::BoundaryFlatHashValueType

Definition at line 107 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef BoundaryType::IndexType itk::watershed::Segmenter< TInputImage >::BoundaryIndexType

Definition at line 106 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef Boundary< InputPixelType, itkGetStaticConstMacro(ImageDimension) > itk::watershed::Segmenter< TInputImage >::BoundaryType

Definition at line 105 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef BoundaryType::Pointer itk::watershed::Segmenter< TInputImage >::BoundaryTypePointer

Definition at line 124 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef SmartPointer< const Self > itk::watershed::Segmenter< TInputImage >::ConstPointer

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

Definition at line 115 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef DataObject::Pointer itk::watershed::Segmenter< TInputImage >::DataObjectPointer

Definition at line 109 of file itkWatershedSegmenter.h.

Standard itk::ProcessObject subclass method.

Definition at line 202 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef itksys::hash_map< IdentifierType, edge_table_t, itksys::hash< IdentifierType > > itk::watershed::Segmenter< TInputImage >::edge_table_hash_t
protected

Definition at line 271 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef itksys::hash_map< IdentifierType, InputPixelType, itksys::hash< IdentifierType > > itk::watershed::Segmenter< TInputImage >::edge_table_t
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 segmentadjacency''.

Definition at line 268 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef itksys::hash_map< IdentifierType, flat_region_t, itksys::hash< IdentifierType > > itk::watershed::Segmenter< TInputImage >::flat_region_table_t
protected

Table for storing flat region information.

Definition at line 255 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef InputImageType::RegionType itk::watershed::Segmenter< TInputImage >::ImageRegionType

Definition at line 102 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef TInputImage itk::watershed::Segmenter< TInputImage >::InputImageType

Define image types and dimensionality

Definition at line 96 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef InputImageType::Pointer itk::watershed::Segmenter< TInputImage >::InputImageTypePointer

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

Definition at line 117 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef InputImageType::PixelType itk::watershed::Segmenter< TInputImage >::InputPixelType

Definition at line 103 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef Image< IdentifierType, itkGetStaticConstMacro(ImageDimension) > itk::watershed::Segmenter< TInputImage >::OutputImageType

Definition at line 101 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef OutputImageType::Pointer itk::watershed::Segmenter< TInputImage >::OutputImageTypePointer

Definition at line 122 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef SmartPointer< Self > itk::watershed::Segmenter< TInputImage >::Pointer

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

Definition at line 114 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef SegmentTable< InputPixelType > itk::watershed::Segmenter< TInputImage >::SegmentTableType

Definition at line 108 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef SegmentTableType::Pointer itk::watershed::Segmenter< TInputImage >::SegmentTableTypePointer

Definition at line 123 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef Segmenter itk::watershed::Segmenter< TInputImage >::Self

Standard self typedefs

Definition at line 93 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef ProcessObject itk::watershed::Segmenter< TInputImage >::Superclass

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

Definition at line 113 of file itkWatershedSegmenter.h.

Constructor & Destructor Documentation

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

Definition at line 274 of file itkWatershedSegmenter.h.

template<class TInputImage>
virtual itk::watershed::Segmenter< TInputImage >::~Segmenter ( )
protectedvirtual

Member Function Documentation

template<class 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.

template<class 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.

template<class 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.

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

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

Reimplemented from itk::Object.

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

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

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

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

template<class TInputImage>
void itk::watershed::Segmenter< TInputImage >::GenerateData ( )
virtual

Standard non-threaded pipeline execution method.

Reimplemented from itk::ProcessObject.

template<class TInputImage>
void itk::watershed::Segmenter< TInputImage >::GenerateInputRequestedRegion ( )
protectedvirtual

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.

template<class TInputImage>
void itk::watershed::Segmenter< TInputImage >::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<class TInputImage>
BoundaryType* itk::watershed::Segmenter< TInputImage >::GetBoundary ( void  )
inline

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

Definition at line 166 of file itkWatershedSegmenter.h.

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

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

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

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

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

Get/Set the input image.

Definition at line 133 of file itkWatershedSegmenter.h.

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

Definition at line 192 of file itkWatershedSegmenter.h.

template<class 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.

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

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

Definition at line 144 of file itkWatershedSegmenter.h.

template<class TInputImage>
SegmentTableType* itk::watershed::Segmenter< TInputImage >::GetSegmentTable ( void  )
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 155 of file itkWatershedSegmenter.h.

template<class 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.

template<class TInputImage>
virtual double itk::watershed::Segmenter< TInputImage >::GetThreshold ( ) const
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.

template<class 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.

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

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

template<class 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.

template<class TInputImage>
virtual DataObjectPointer itk::watershed::Segmenter< TInputImage >::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<class 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.

template<class 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.

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

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

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

Definition at line 278 of file itkWatershedSegmenter.h.

template<class TInputImage>
void itk::watershed::Segmenter< TInputImage >::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<class 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.

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

Definition at line 172 of file itkWatershedSegmenter.h.

template<class 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.

template<class 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.

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

Definition at line 139 of file itkWatershedSegmenter.h.

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

Helper functions for filling in regions with values

template<class 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 184 of file itkWatershedSegmenter.h.

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

Definition at line 150 of file itkWatershedSegmenter.h.

template<class TInputImage>
static void itk::watershed::Segmenter< TInputImage >::SetOutputImageValues ( OutputImageTypePointer  img,
const ImageRegionType  region,
IdentifierType  value 
)
staticprotected
template<class TInputImage>
void itk::watershed::Segmenter< TInputImage >::SetSegmentTable ( SegmentTableType s)
inline

Definition at line 161 of file itkWatershedSegmenter.h.

template<class TInputImage>
virtual void itk::watershed::Segmenter< TInputImage >::SetSortEdgeLists ( bool  _arg)
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.

template<class 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.

template<class 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.

template<class TInputImage>
void itk::watershed::Segmenter< TInputImage >::UpdateOutputInformation ( )
protectedvirtual

Update the information describing the output data. This method transverses up the pipeline gathering modified time information. On the way back down the pipeline, this method calls GenerateOutputInformation() to set any necessary information about the output data objects. For instance, a filter that shrinks an image will need to provide an implementation for GenerateOutputInformation() that changes the spacing of the pixels. Such filters should call their superclass' implementation of GenerateOutputInformation prior to changing the information values they need (i.e. GenerateOutputInformation() should call Superclass::GenerateOutputInformation() prior to changing the information.

Reimplemented from itk::ProcessObject.

template<class 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

template<class TInputImage>
const unsigned int itk::watershed::Segmenter< TInputImage >::ImageDimension = TInputImage::ImageDimension
static

Definition at line 98 of file itkWatershedSegmenter.h.

template<class 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 368 of file itkWatershedSegmenter.h.

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

Definition at line 383 of file itkWatershedSegmenter.h.

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

Definition at line 380 of file itkWatershedSegmenter.h.

template<class 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 377 of file itkWatershedSegmenter.h.

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

Definition at line 382 of file itkWatershedSegmenter.h.

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

Definition at line 379 of file itkWatershedSegmenter.h.

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

Definition at line 381 of file itkWatershedSegmenter.h.

template<class TInputImage>
const unsigned long itk::watershed::Segmenter< TInputImage >::NULL_FLOW = -1
static

A constant used in the labeling algorithm.

Definition at line 130 of file itkWatershedSegmenter.h.

template<class TInputImage>
const unsigned long itk::watershed::Segmenter< TInputImage >::NULL_LABEL = 0
static

A constant used in the labeling algorithm.

Definition at line 127 of file itkWatershedSegmenter.h.


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