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;
96 #endif // BIOPROCESSING_WATERSHED_WATERSHED carto::VolumeRef< L > getMinima()
carto::VolumeRef< L > _minima
void setQuiet()
Equivalent to setVerbose(0)
carto::VolumeRef< L > execute(carto::VolumeRef< T > in)
Executes the chosen watershed segmentation to the input volume.
Watershed()
Default constructor The default implementation used is Cousty.
carto::VolumeRef< L > _watershed
void setVerbose(int verbose=1)
Sets the verbosity level.
carto::VolumeRef< L > getMinima()
void setVerbose(int verbose=1)
void set2D()
When 2D mode is active, a 2D connectivity is used (4XY)
Interface to watershed implementations.
void setImplementation(const std::string &implem)
Sets the watershed method Possible implementations are:
carto::VolumeRef< L > execute(carto::VolumeRef< T > in)
Allocate and return the watershed segmentation of the input image.
Watershed(const std::string &implem)
Constructor from implementation Possible implementations are:
Watershed implementation as described in Cousty et al - Watershed cuts: minimum spanning forests and ...