11 #ifndef BIOPROCESSING_WATERSHED_WATERSHED
12 #define BIOPROCESSING_WATERSHED_WATERSHED
17 #include <cartodata/volume/volume.h>
19 #include <cartobase/config/verbose.h>
31 template <
typename T,
typename L>
63 carto::VolumeRef<L>
execute( carto::VolumeRef<T> in )
69 if( in.getSizeX() == 1 )
77 std::cout <<
"unknown watershed implementation" << std::endl;
Watershed implementation as described in Cousty et al - Watershed cuts: minimum spanning forests and ...
carto::VolumeRef< L > execute(carto::VolumeRef< T > in)
Allocate and return the watershed segmentation of the input image.
void set2D()
When 2D mode is active, a 2D connectivity is used (4XY)
void setVerbose(int verbose=1)
carto::VolumeRef< L > getMinima()
Interface to watershed implementations.
carto::VolumeRef< L > _minima
carto::VolumeRef< L > _watershed
void setImplementation(const std::string &implem)
Sets the watershed method Possible implementations are:
Watershed(const std::string &implem)
Constructor from implementation Possible implementations are:
void setQuiet()
Equivalent to setVerbose(0)
carto::VolumeRef< L > execute(carto::VolumeRef< T > in)
Executes the chosen watershed segmentation to the input volume.
carto::VolumeRef< L > getMinima()
Watershed()
Default constructor The default implementation used is Cousty.
void setVerbose(int verbose=1)
Sets the verbosity level.