Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itk::watershed::Segmenter< TInputImage > Class Template Reference

#include <itkWatershedSegmenter.h>

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

Inheritance graph
[legend]
Collaboration diagram for itk::watershed::Segmenter< TInputImage >:

Collaboration graph
[legend]
List of all members.

[NOHEADER]

typedef TInputImage InputImageType
typedef Image< unsigned long,
itkGetStaticConstMacro(ImageDimension) 
OutputImageType )
typedef InputImageType::RegionType ImageRegionType
typedef InputImageType::PixelType InputPixelType
typedef Boundary< InputPixelType,
itkGetStaticConstMacro(ImageDimension) 
BoundaryType )
typedef BoundaryType::IndexType BoundaryIndexType
typedef BoundaryType::FlatHashValueType BoundaryFlatHashValueType
typedef SegmentTable< InputPixelTypeSegmentTableType
typedef DataObject::Pointer DataObjectPointer
 itkStaticConstMacro (ImageDimension, unsigned int, TInputImage::ImageDimension)

[NOHEADER]

typedef ProcessObject Superclass
typedef SmartPointer< SelfPointer
typedef SmartPointer< const
Self
ConstPointer
virtual const char * GetNameOfClass () const
Pointer New ()

Public Types

typedef Segmenter Self
typedef InputImageType::Pointer InputImageTypePointer
typedef OutputImageType::Pointer OutputImageTypePointer
typedef SegmentTableType::Pointer SegmentTableTypePointer
typedef BoundaryType::Pointer BoundaryTypePointer

Public Member Functions

void GenerateData ()
virtual DataObjectPointer MakeOutput (unsigned int idx)
InputImageTypeGetInputImage (void)
void SetInputImage (InputImageType *img)
OutputImageTypeGetOutputImage (void)
void SetOutputImage (OutputImageType *img)
SegmentTableTypeGetSegmentTable (void)
void SetSegmentTable (SegmentTableType *s)
BoundaryTypeGetBoundary (void)
void SetBoundary (BoundaryType *b)
void SetLargestPossibleRegion (ImageRegionType reg)
ImageRegionType GetLargestPossibleRegion () const
virtual void SetCurrentLabel (unsigned long _arg)
virtual unsigned long GetCurrentLabel ()
virtual void SetThreshold (double _arg)
virtual double GetThreshold ()
virtual void SetDoBoundaryAnalysis (bool _arg)
virtual bool GetDoBoundaryAnalysis ()
virtual bool GetSortEdgeLists ()
virtual void SetSortEdgeLists (bool _arg)

Static Public Member Functions

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

Static Public Attributes

unsigned long NULL_LABEL
short NULL_FLOW

Protected Types

typedef itk::hash_map< unsigned
long, flat_region_t, itk::hash<
unsigned long > > 
flat_region_table_t
typedef itk::hash_map< unsigned
long, InputPixelType, itk::hash<
unsigned long > > 
edge_table_t
typedef itk::hash_map< unsigned
long, edge_table_t, itk::hash<
unsigned long > > 
edge_table_hash_t

Protected Member Functions

 Segmenter ()
 Segmenter (const Self &)
virtual ~Segmenter ()
void PrintSelf (std::ostream &os, Indent indent) const
void operator= (const Self &)
virtual void GenerateConnectivity ()
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 &)
void GenerateInputRequestedRegion ()
void GenerateOutputRequestedRegion (DataObject *output)
void UpdateOutputInformation ()

Static Protected Member Functions

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

Protected Attributes

connectivity_t m_Connectivity

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


Member Typedef Documentation

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

Define image types and dimensionality

Definition at line 106 of file itkWatershedSegmenter.h.

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

Define image types and dimensionality

Definition at line 105 of file itkWatershedSegmenter.h.

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

Define image types and dimensionality

Definition at line 104 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

Reimplemented from itk::ProcessObject.

Definition at line 115 of file itkWatershedSegmenter.h.

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

Define image types and dimensionality

Reimplemented from itk::ProcessObject.

Definition at line 108 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef itk::hash_map<unsigned long, edge_table_t, itk::hash<unsigned long> > itk::watershed::Segmenter< TInputImage >::edge_table_hash_t [protected]
 

Definition at line 261 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef itk::hash_map<unsigned long, InputPixelType, itk::hash<unsigned long> > 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 segment ``adjacency''.

Definition at line 258 of file itkWatershedSegmenter.h.

template<class TInputImage>
typedef itk::hash_map<unsigned long, flat_region_t, itk::hash<unsigned long> > itk::watershed::Segmenter< TInputImage >::flat_region_table_t [protected]
 

Table for storing flat region information.

Definition at line 244 of file itkWatershedSegmenter.h.

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

Define image types and dimensionality

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 98 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 121 of file itkWatershedSegmenter.h.

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

Define image types and dimensionality

Definition at line 103 of file itkWatershedSegmenter.h.

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

Define image types and dimensionality

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

Reimplemented from itk::ProcessObject.

Definition at line 114 of file itkWatershedSegmenter.h.

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

Define image types and dimensionality

Definition at line 107 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

Reimplemented from itk::ProcessObject.

Definition at line 95 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

Reimplemented from itk::ProcessObject.

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  )  [inline, protected]
 

Definition at line 264 of file itkWatershedSegmenter.h.

template<class TInputImage>
virtual itk::watershed::Segmenter< TInputImage >::~Segmenter  )  [protected, virtual]
 


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>
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  )  [protected, virtual]
 

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

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  )  [protected, virtual]
 

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  )  [protected, virtual]
 

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>
BoundaryType* itk::watershed::Segmenter< TInputImage >::GetBoundary void   )  [inline]
 

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

Definition at line 160 of file itkWatershedSegmenter.h.

template<class TInputImage>
virtual unsigned long itk::watershed::Segmenter< TInputImage >::GetCurrentLabel  )  [virtual]
 

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

template<class TInputImage>
virtual bool itk::watershed::Segmenter< TInputImage >::GetDoBoundaryAnalysis  )  [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]
 

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 182 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 unsigned long integers.

Definition at line 142 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 151 of file itkWatershedSegmenter.h.

template<class TInputImage>
virtual bool itk::watershed::Segmenter< TInputImage >::GetSortEdgeLists  )  [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  )  [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 /f$ L = min + T * (max - min) /f$, where /f$ max, min /f$ are the maximum, minimum values in the image and /f$ T /f$ is the threshold parameter value. Values in the image less than /f$ L /f$ are raised to /f$ L /f$. 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>
itk::watershed::Segmenter< TInputImage >::itkStaticConstMacro ImageDimension  ,
unsigned  int,
TInputImage::ImageDimension 
 

Define image types and dimensionality

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 unsigned int  idx  )  [virtual]
 

Standard itk::ProcessObject subclass method.

Reimplemented from itk::ProcessObject.

template<class TInputImage>
void itk::watershed::Segmenter< TInputImage >::MergeFlatRegions flat_region_table_t ,
EquivalencyTable::Pointer 
[static, protected]
 

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

template<class TInputImage>
void itk::watershed::Segmenter< TInputImage >::MinMax InputImageTypePointer  img,
ImageRegionType  region,
InputPixelType min,
InputPixelType max
[static, protected]
 

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

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

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

Reimplemented from itk::Object.

template<class TInputImage>
void itk::watershed::Segmenter< TInputImage >::operator= const Self  )  [inline, protected]
 

Reimplemented from itk::ProcessObject.

Definition at line 267 of file itkWatershedSegmenter.h.

template<class TInputImage>
void itk::watershed::Segmenter< TInputImage >::PrintSelf std::ostream &  os,
Indent  indent
const [protected, virtual]
 

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>
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]
 

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

Definition at line 163 of file itkWatershedSegmenter.h.

template<class TInputImage>
virtual void itk::watershed::Segmenter< TInputImage >::SetCurrentLabel unsigned long  _arg  )  [virtual]
 

Gets/Sets the initial label (unsigned long 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]
 

Get/Set the input image.

Definition at line 136 of file itkWatershedSegmenter.h.

template<class TInputImage>
void itk::watershed::Segmenter< TInputImage >::SetInputImageValues InputImageTypePointer  img,
const ImageRegionType  region,
InputPixelType  value
[static, protected]
 

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 176 of file itkWatershedSegmenter.h.

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

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

Definition at line 145 of file itkWatershedSegmenter.h.

template<class TInputImage>
void itk::watershed::Segmenter< TInputImage >::SetOutputImageValues OutputImageTypePointer  img,
const ImageRegionType  region,
unsigned long  value
[static, protected]
 

template<class TInputImage>
void itk::watershed::Segmenter< TInputImage >::SetSegmentTable SegmentTableType s  )  [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 154 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 /f$ L = min + T * (max - min) /f$, where /f$ max, min /f$ are the maximum, minimum values in the image and /f$ T /f$ is the threshold parameter value. Values in the image less than /f$ L /f$ are raised to /f$ L /f$. 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 >::Threshold InputImageTypePointer  destination,
InputImageTypePointer  source,
const ImageRegionType  source_region,
const ImageRegionType  destination_region,
InputPixelType  threshold
[static, protected]
 

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  )  [protected, virtual]
 

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 >::UpdateSegmentTable InputImageTypePointer  ,
ImageRegionType 
[protected]
 

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


Member Data Documentation

template<class TInputImage>
connectivity_t itk::watershed::Segmenter< TInputImage >::m_Connectivity [protected]
 

Holds generalized connectivity information for connected component labeling and gradient descent analysis in pixel neighborhoods.

Definition at line 356 of file itkWatershedSegmenter.h.

template<class TInputImage>
short itk::watershed::Segmenter< TInputImage >::NULL_FLOW [static]
 

A constant used in the labeling algorithm.

Definition at line 130 of file itkWatershedSegmenter.h.

template<class TInputImage>
unsigned long itk::watershed::Segmenter< TInputImage >::NULL_LABEL [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:
Generated at Thu May 25 03:19:02 2006 for ITK by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2000