bioprocessing
5.1.2
|
Watershed implementation as described in Cousty et al - Watershed cuts: minimum spanning forests and the drop of water principle (2007) The computation is done in linear time. More...
#include <bioprocessing/watershed/coustywatershed.h>
Public Types | |
typedef Point4dl | Point |
Point type. More... | |
typedef VolumeGraphRef< T, Point > | Graph |
Graph type. More... | |
typedef Graph::Vertex | Vertex |
Vertex type. More... | |
typedef Graph::Edge | Edge |
Edge type. More... | |
typedef CoustyStreamRef< Vertex > | Stream |
Stream type (a set of vertices) More... | |
typedef CoustyFlowMapRef< Vertex, L > | FlowMap |
FlowMap type (the labelled image) More... | |
Public Member Functions | |
CoustyWatershed () | |
~CoustyWatershed () | |
void | setVerbose (int verbose=1) |
void | setQuiet () |
void | set3D () |
When 3D mode is active, a 3D connectivity is used (6XYZ) More... | |
void | set2D () |
When 2D mode is active, a 2D connectivity is used (4XY) More... | |
carto::VolumeRef< L > | execute (carto::VolumeRef< T > in) |
Allocate and return the watershed segmentation of the input image. More... | |
void | execute (carto::VolumeRef< T > in, carto::VolumeRef< L > out) |
Return the watershed segmentation of the input image into an already allocated volume. More... | |
carto::VolumeRef< L > | getMinima () |
Protected Member Functions | |
void | computeWatershed () |
Iterates on the vertices of the image, and for each one follows a descent stream until it encounters a labelled vertex or a local minima. More... | |
L | computeStream (Vertex x) |
Follows the descent stream from vertex v . More... | |
bool | findEdge (Vertex y, Vertex &z) |
Finds an edge of minimum altitude for y. More... | |
void | setLabel (L lab) |
Sets the label lab for all vertices in the stream _s. More... | |
Protected Attributes | |
Graph | _g |
Stream | _s |
FlowMap | _psi |
int | _verbose |
bool | _3d |
Watershed implementation as described in Cousty et al - Watershed cuts: minimum spanning forests and the drop of water principle (2007) The computation is done in linear time.
In order to save memory, this implementations uses a volume and not a classic graph.
Definition at line 39 of file coustywatershed.h.
typedef Graph::Edge bio::CoustyWatershed< T, L >::Edge |
Edge type.
Definition at line 46 of file coustywatershed.h.
typedef CoustyFlowMapRef<Vertex,L> bio::CoustyWatershed< T, L >::FlowMap |
FlowMap type (the labelled image)
Definition at line 48 of file coustywatershed.h.
typedef VolumeGraphRef<T,Point> bio::CoustyWatershed< T, L >::Graph |
Graph type.
Definition at line 44 of file coustywatershed.h.
typedef Point4dl bio::CoustyWatershed< T, L >::Point |
Point type.
Definition at line 43 of file coustywatershed.h.
typedef CoustyStreamRef<Vertex> bio::CoustyWatershed< T, L >::Stream |
Stream type (a set of vertices)
Definition at line 47 of file coustywatershed.h.
typedef Graph::Vertex bio::CoustyWatershed< T, L >::Vertex |
Vertex type.
Definition at line 45 of file coustywatershed.h.
|
inline |
Definition at line 52 of file coustywatershed.h.
|
inline |
Definition at line 53 of file coustywatershed.h.
|
protected |
Follows the descent stream from vertex v
.
Definition at line 167 of file coustywatershed.h.
References bio::CoustyStreamRef< V >::begin(), bio::CoustyStreamRef< V >::empty(), bio::CoustyStreamRef< V >::erase(), bio::CoustyStreamRef< V >::insert(), and bio::CoustyStreamRef< V >::reset().
|
protected |
Iterates on the vertices of the image, and for each one follows a descent stream until it encounters a labelled vertex or a local minima.
This label (or new label if it's a new local minima) is set to all the vertices of the stream.
Definition at line 125 of file coustywatershed.h.
carto::VolumeRef< L > bio::CoustyWatershed< T, L >::execute | ( | carto::VolumeRef< T > | in | ) |
Allocate and return the watershed segmentation of the input image.
Definition at line 101 of file coustywatershed.h.
Referenced by bio::Watershed< T, L >::execute().
void bio::CoustyWatershed< T, L >::execute | ( | carto::VolumeRef< T > | in, |
carto::VolumeRef< L > | out | ||
) |
Return the watershed segmentation of the input image into an already allocated volume.
Definition at line 111 of file coustywatershed.h.
|
protected |
Finds an edge of minimum altitude for y.
Definition at line 203 of file coustywatershed.h.
|
inline |
Definition at line 71 of file coustywatershed.h.
References bio::CoustyWatershed< T, L >::_psi.
Referenced by bio::Watershed< T, L >::execute().
|
inline |
When 2D mode is active, a 2D connectivity is used (4XY)
Definition at line 62 of file coustywatershed.h.
References bio::CoustyWatershed< T, L >::_3d.
Referenced by bio::Watershed< T, L >::execute().
|
inline |
When 3D mode is active, a 3D connectivity is used (6XYZ)
Definition at line 60 of file coustywatershed.h.
References bio::CoustyWatershed< T, L >::_3d.
|
protected |
Sets the label lab
for all vertices in the stream _s.
Definition at line 157 of file coustywatershed.h.
|
inline |
Definition at line 58 of file coustywatershed.h.
References bio::CoustyWatershed< T, L >::setVerbose().
|
inline |
Definition at line 57 of file coustywatershed.h.
References bio::CoustyWatershed< T, L >::_verbose.
Referenced by bio::Watershed< T, L >::execute(), and bio::CoustyWatershed< T, L >::setQuiet().
|
protected |
Definition at line 93 of file coustywatershed.h.
Referenced by bio::CoustyWatershed< T, L >::set2D(), and bio::CoustyWatershed< T, L >::set3D().
|
protected |
Definition at line 89 of file coustywatershed.h.
|
protected |
Definition at line 91 of file coustywatershed.h.
Referenced by bio::CoustyWatershed< T, L >::getMinima().
|
protected |
Definition at line 90 of file coustywatershed.h.
|
protected |
Definition at line 92 of file coustywatershed.h.
Referenced by bio::CoustyWatershed< T, L >::setVerbose().