GOFIGURE2
0.9.0
|
Morphological watershed transform from markers. More...
#include <Code/Filters/itkMorphologicalWatershedFromMarkersImageFilter2.h>
Public Types | |
typedef SmartPointer< const Self > | ConstPointer |
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< Self > | Pointer |
typedef MorphologicalWatershedFromMarkersImageFilter2 | Self |
typedef ImageToImageFilter < TInputImage, TLabelImage > | Superclass |
Public Member Functions | |
const LabelImageType * | GetMarkerImage () 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 |
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.
Definition at line 106 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
typedef SmartPointer< const Self > itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::ConstPointer |
Definition at line 114 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
typedef LabelImageType::IndexType itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::IndexType |
Definition at line 128 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
typedef InputImageType::ConstPointer itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::InputImageConstPointer |
Definition at line 120 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
typedef InputImageType::PixelType itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::InputImagePixelType |
Definition at line 122 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
typedef InputImageType::Pointer itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::InputImagePointer |
Definition at line 119 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
typedef InputImageType::RegionType itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::InputImageRegionType |
Definition at line 121 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
typedef TInputImage itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::InputImageType |
Some convenient typedefs.
Definition at line 117 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
typedef LabelImageType::ConstPointer itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::LabelImageConstPointer |
Definition at line 124 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
typedef LabelImageType::PixelType itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::LabelImagePixelType |
Definition at line 126 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
typedef LabelImageType::Pointer itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::LabelImagePointer |
Definition at line 123 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
typedef LabelImageType::RegionType itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::LabelImageRegionType |
Definition at line 125 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
typedef TLabelImage itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::LabelImageType |
Definition at line 118 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
typedef SmartPointer< Self > itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::Pointer |
Definition at line 113 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
typedef MorphologicalWatershedFromMarkersImageFilter2 itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::Self |
Standard class typedefs.
Definition at line 111 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
typedef ImageToImageFilter< TInputImage, TLabelImage > itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::Superclass |
Definition at line 112 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
|
protected |
|
inlineprotected |
Definition at line 193 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
|
private |
|
protected |
This filter will enlarge the output requested region to produce all of the output.
|
protected |
The filter is single threaded.
|
protected |
MorphologicalWatershedFromMarkersImageFilter2 needs to request the entire input images.
|
inline |
Get the marker image
Definition at line 149 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::itkBooleanMacro | ( | FullyConnected | ) |
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::itkBooleanMacro | ( | MarkWatershedLine | ) |
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::itkGetConstReferenceMacro | ( | FullyConnected | , |
bool | |||
) |
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::itkGetConstReferenceMacro | ( | MarkWatershedLine | , |
bool | |||
) |
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::itkNewMacro | ( | Self | ) |
Standard New method.
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.
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.
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::itkStaticConstMacro | ( | ImageDimension | , |
unsigned | int, | ||
TInputImage::ImageDimension | |||
) |
ImageDimension constants
itk::MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage >::itkTypeMacro | ( | MorphologicalWatershedFromMarkersImageFilter2< TInputImage, TLabelImage > | , |
ImageToImageFilter | |||
) |
Runtime information support.
|
private |
|
protected |
|
inline |
Set the marker image
Definition at line 168 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
|
inline |
Set the input image
Definition at line 156 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
|
inline |
Set the marker image
Definition at line 162 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
|
inline |
Set the marker image
Definition at line 142 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
|
protected |
Definition at line 209 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
|
private |
Definition at line 215 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.
|
private |
Definition at line 217 of file itkMorphologicalWatershedFromMarkersImageFilter2.h.