|
bioprocessing 6.0.4
|
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. | |
| typedef VolumeGraphRef< T, Point > | Graph |
| Graph type. | |
| typedef Graph::Vertex | Vertex |
| Vertex type. | |
| typedef Graph::Edge | Edge |
| Edge type. | |
| typedef CoustyStreamRef< Vertex > | Stream |
| Stream type (a set of vertices) | |
| typedef CoustyFlowMapRef< Vertex, L > | FlowMap |
| FlowMap type (the labelled image) | |
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) | |
| void | set2D () |
| When 2D mode is active, a 2D connectivity is used (4XY) | |
| carto::VolumeRef< L > | execute (carto::VolumeRef< T > in) |
| Allocate and return the watershed segmentation of the input image. | |
| void | execute (carto::VolumeRef< T > in, carto::VolumeRef< L > out) |
| Return the watershed segmentation of the input image into an already allocated volume. | |
| 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. | |
| L | computeStream (Vertex x) |
Follows the descent stream from vertex v. | |
| bool | findEdge (Vertex y, Vertex &z) |
| Finds an edge of minimum altitude for y. | |
| void | setLabel (L lab) |
Sets the label lab for all vertices in the stream _s. | |
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 |
|
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 _g, _psi, _s, bio::CoustyStreamRef< V >::begin(), bio::CoustyStreamRef< V >::empty(), bio::CoustyStreamRef< V >::erase(), findEdge(), bio::CoustyStreamRef< V >::insert(), and bio::CoustyStreamRef< V >::reset().
Referenced by computeWatershed().
|
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.
References _psi, _verbose, computeStream(), and setLabel().
Referenced by execute().
| 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.
References execute().
Referenced by execute(), and 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.
References _3d, _g, _psi, _s, and computeWatershed().
|
protected |
Finds an edge of minimum altitude for y.
Definition at line 203 of file coustywatershed.h.
Referenced by computeStream().
|
inline |
Definition at line 71 of file coustywatershed.h.
References _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 _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 _3d.
|
protected |
Sets the label lab for all vertices in the stream _s.
Definition at line 157 of file coustywatershed.h.
Referenced by computeWatershed().
|
inline |
Definition at line 58 of file coustywatershed.h.
References setVerbose().
|
inline |
Definition at line 57 of file coustywatershed.h.
References _verbose.
Referenced by bio::Watershed< T, L >::execute(), and setQuiet().
|
protected |
Definition at line 93 of file coustywatershed.h.
Referenced by CoustyWatershed(), execute(), set2D(), and set3D().
|
protected |
Definition at line 89 of file coustywatershed.h.
Referenced by computeStream(), CoustyWatershed(), execute(), and findEdge().
|
protected |
Definition at line 91 of file coustywatershed.h.
Referenced by computeStream(), computeWatershed(), CoustyWatershed(), execute(), getMinima(), and setLabel().
|
protected |
Definition at line 90 of file coustywatershed.h.
Referenced by computeStream(), CoustyWatershed(), execute(), findEdge(), and setLabel().
|
protected |
Definition at line 92 of file coustywatershed.h.
Referenced by computeWatershed(), CoustyWatershed(), and setVerbose().