GOFIGURE2  0.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage > Class Template Reference

Morphological watershed transform from markers. More...

#include <Code/Filters/itkMorphologicalWatershedFromMarkersImageFilter2.h>

Inheritance diagram for itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >:
Inheritance graph
[legend]
Collaboration diagram for itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >:
Collaboration graph
[legend]

Public Types

typedef SmartPointer< const SelfConstPointer
 
typedef LabelImageType::IndexType IndexType
 
typedef
InputImageType::ConstPointer 
InputImageConstPointer
 
typedef InputImageType::PixelType InputImagePixelType
 
typedef InputImageType::Pointer InputImagePointer
 
typedef InputImageType::RegionType InputImageRegionType
 
typedef TInputImage InputImageType
 
typedef
LabelImageType::ConstPointer 
LabelImageConstPointer
 
typedef LabelImageType::PixelType LabelImagePixelType
 
typedef LabelImageType::Pointer LabelImagePointer
 
typedef LabelImageType::RegionType LabelImageRegionType
 
typedef TLabelImage LabelImageType
 
typedef SmartPointer< SelfPointer
 
typedef
MorphologicalWatershedFromMarkersImageFilter2 
Self
 
typedef ImageToImageFilter
< TInputImage, TLabelImage > 
Superclass
 

Public Member Functions

const LabelImageTypeGetMarkerImage () const
 
 itkBooleanMacro (FullyConnected)
 
 itkBooleanMacro (MarkWatershedLine)
 
 itkGetConstReferenceMacro (FullyConnected, bool)
 
 itkGetConstReferenceMacro (MarkWatershedLine, bool)
 
 itkNewMacro (Self)
 
 itkSetMacro (FullyConnected, bool)
 
 itkSetMacro (MarkWatershedLine, bool)
 
 itkStaticConstMacro (ImageDimension, unsigned int, TInputImage::ImageDimension)
 
 itkTypeMacro (MorphologicalWatershedFromMarkersImageFilter2, ImageToImageFilter)
 
void SetForegroundImage (TLabelImage *fg)
 
void SetInput1 (const TInputImage *input)
 
void SetInput2 (const TLabelImage *input)
 
void SetMarkerImage (const TLabelImage *input)
 

Protected Member Functions

void EnlargeOutputRequestedRegion (DataObject *itkNotUsed(output))
 
void GenerateData ()
 
void GenerateInputRequestedRegion ()
 
 MorphologicalWatershedFromMarkersImageFilter2 ()
 
void PrintSelf (std::ostream &os, Indent indent) const
 
 ~MorphologicalWatershedFromMarkersImageFilter2 ()
 

Protected Attributes

LabelImagePointer m_ForegroundImg
 

Private Member Functions

 MorphologicalWatershedFromMarkersImageFilter2 (const Self &)
 
void operator= (const Self &)
 

Private Attributes

bool m_FullyConnected
 
bool m_MarkWatershedLine
 

Detailed Description

template<class TInputImage, class TLabelImage>
class itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >

Morphological watershed transform from markers.

The watershed transform is a tool for image segmentation that is fast and flexible and potentially fairly parameter free. It was originally derived from a geophysical model of rain falling on a terrain and a variety of more formal definitions have been devised to allow development of practical algorithms. If an image is considered as a terrain and divided into catchment basins then the hope is that each catchment basin would contain an object of interest.

The output is a label image. A label image, sometimes referred to as a categorical image, has unique values for each region. For example, if a watershed produces 2 regions, all pixels belonging to one region would have value A, and all belonging to the other might have value B. Unassigned pixels, such as watershed lines, might have the background value (0 by convention).

The simplest way of using the watershed is to preprocess the image we want to segment so that the boundaries of our objects are bright (e.g apply an edge detector) and compute the watershed transform of the edge image. Watershed lines will correspond to the boundaries and our problem will be solved. This is rarely useful in practice because there are always more regional minima than there are objects, either due to noise or natural variations in the object surfaces. Therefore, while many watershed lines do lie on significant boundaries, there are many that don't. Various methods can be used to reduce the number of minima in the image, like thresholding the smallest values, filtering the minima and/or smoothing the image.

This filter use another approach to avoid the problem of over segmentation: it let the user provide a marker image which mark the minima in the input image and give them a label. The minima are imposed in the input image by the markers. The labels of the output image are the label of the marker image.

The morphological watershed transform algorithm is described in Chapter 9.2 of Pierre Soille's book "Morphological Image Analysis: Principles and Applications", Second Edition, Springer, 2003.

Author
Gaetan Lehmann. Biologie du Developpement et de la Reproduction, INRA de Jouy-en-Josas, France.
Richard Beare. Department of Medicine, Monash University, Melbourne, Australia.
See Also
WatershedImageFilter, MorphologicalWatershedImageFilter

Definition at line 106 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.

Member Typedef Documentation

template<class TInputImage , class TLabelImage >
typedef SmartPointer< const Self > itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::ConstPointer
template<class TInputImage , class TLabelImage >
typedef LabelImageType::IndexType itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::IndexType
template<class TInputImage , class TLabelImage >
typedef InputImageType::ConstPointer itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::InputImageConstPointer
template<class TInputImage , class TLabelImage >
typedef InputImageType::PixelType itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::InputImagePixelType
template<class TInputImage , class TLabelImage >
typedef InputImageType::Pointer itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::InputImagePointer
template<class TInputImage , class TLabelImage >
typedef InputImageType::RegionType itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::InputImageRegionType
template<class TInputImage , class TLabelImage >
typedef TInputImage itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::InputImageType

Some convenient typedefs.

Definition at line 117 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.

template<class TInputImage , class TLabelImage >
typedef LabelImageType::ConstPointer itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::LabelImageConstPointer
template<class TInputImage , class TLabelImage >
typedef LabelImageType::PixelType itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::LabelImagePixelType
template<class TInputImage , class TLabelImage >
typedef LabelImageType::Pointer itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::LabelImagePointer
template<class TInputImage , class TLabelImage >
typedef LabelImageType::RegionType itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::LabelImageRegionType
template<class TInputImage , class TLabelImage >
typedef TLabelImage itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::LabelImageType
template<class TInputImage , class TLabelImage >
typedef SmartPointer< Self > itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::Pointer
template<class TInputImage , class TLabelImage >
typedef MorphologicalWatershedFromMarkersImageFilter2 itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::Self

Standard class typedefs.

Definition at line 111 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.

template<class TInputImage , class TLabelImage >
typedef ImageToImageFilter< TInputImage, TLabelImage > itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::Superclass

Constructor & Destructor Documentation

template<class TInputImage , class TLabelImage >
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::MorphologicalWatershedFromMarkersImageFilter2 ( )
protected
template<class TInputImage , class TLabelImage >
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::~MorphologicalWatershedFromMarkersImageFilter2 ( )
inlineprotected
template<class TInputImage , class TLabelImage >
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::MorphologicalWatershedFromMarkersImageFilter2 ( const Self )
private

Member Function Documentation

template<class TInputImage , class TLabelImage >
void itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::EnlargeOutputRequestedRegion ( DataObject *  itkNotUsedoutput)
protected

This filter will enlarge the output requested region to produce all of the output.

See Also
ProcessObject::EnlargeOutputRequestedRegion()
template<class TInputImage , class TLabelImage >
void itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::GenerateData ( )
protected

The filter is single threaded.

template<class TInputImage , class TLabelImage >
void itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::GenerateInputRequestedRegion ( )
protected

MorphologicalWatershedFromMarkersImageFilter2 needs to request the entire input images.

template<class TInputImage , class TLabelImage >
const LabelImageType* itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::GetMarkerImage ( ) const
inline

Get the marker image

Definition at line 149 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.

template<class TInputImage , class TLabelImage >
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::itkBooleanMacro ( FullyConnected  )
template<class TInputImage , class TLabelImage >
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::itkBooleanMacro ( MarkWatershedLine  )
template<class TInputImage , class TLabelImage >
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::itkGetConstReferenceMacro ( FullyConnected  ,
bool   
)
template<class TInputImage , class TLabelImage >
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::itkGetConstReferenceMacro ( MarkWatershedLine  ,
bool   
)
template<class TInputImage , class TLabelImage >
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::itkNewMacro ( Self  )

Standard New method.

template<class TInputImage , class TLabelImage >
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::itkSetMacro ( FullyConnected  ,
bool   
)

Set/Get whether the connected components are defined strictly by face connectivity or by face+edge+vertex connectivity. Default is FullyConnectedOff. For objects that are 1 pixel wide, use FullyConnectedOn.

template<class TInputImage , class TLabelImage >
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::itkSetMacro ( MarkWatershedLine  ,
bool   
)

Set/Get whether the watershed pixel must be marked or not. Default is true. Set it to false do not only avoid writing watershed pixels, it also decrease algorithm complexity.

template<class TInputImage , class TLabelImage >
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::itkStaticConstMacro ( ImageDimension  ,
unsigned  int,
TInputImage::ImageDimension   
)

ImageDimension constants

template<class TInputImage , class TLabelImage >
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::itkTypeMacro ( MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >  ,
ImageToImageFilter   
)

Runtime information support.

template<class TInputImage , class TLabelImage >
void itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::operator= ( const Self )
private
template<class TInputImage , class TLabelImage >
void itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::PrintSelf ( std::ostream &  os,
Indent  indent 
) const
protected
template<class TInputImage , class TLabelImage >
void itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::SetForegroundImage ( TLabelImage *  fg)
inline

Set the marker image

Definition at line 168 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.

template<class TInputImage , class TLabelImage >
void itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::SetInput1 ( const TInputImage *  input)
inline

Set the input image

Definition at line 156 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.

template<class TInputImage , class TLabelImage >
void itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::SetInput2 ( const TLabelImage *  input)
inline

Set the marker image

Definition at line 162 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.

template<class TInputImage , class TLabelImage >
void itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::SetMarkerImage ( const TLabelImage *  input)
inline

Set the marker image

Definition at line 142 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.

Member Data Documentation

template<class TInputImage , class TLabelImage >
LabelImagePointer itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::m_ForegroundImg
protected
template<class TInputImage , class TLabelImage >
bool itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::m_FullyConnected
private
template<class TInputImage , class TLabelImage >
bool itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::m_MarkWatershedLine
private

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