Public Types | Public Member Functions | Public Attributes | Protected Member Functions | List of all members
SegmentStatisticsProber< T, D > Class Template Reference

A helper class applied by FloodFillOp and SegmentAreaOp. More...

#include <SegmentStatisticsProber.h>

Inheritance diagram for SegmentStatisticsProber< T, D >:
Inheritance graph
[legend]
Collaboration diagram for SegmentStatisticsProber< T, D >:
Collaboration graph
[legend]

Public Types

typedef T src_t
 
typedef D dst_t
 
- Public Types inherited from SegmentProber< T, D, SegmentProberConf< T, D > >
typedef T src_t
 
typedef D dst_t
 
typedef SegmentProberConf< T, D > conf_t
 

Public Member Functions

 SegmentStatisticsProber (const Channel &s, Channel &d, const std::string statistics="s")
 
virtual bool isValidSegment (int i, int j) const
 Application dependent, to be redefined. Assumes checked coordinates. More...
 
- Public Member Functions inherited from SegmentProber< T, D, SegmentProberConf< T, D > >
 SegmentProber (const Channel &s)
 
 SegmentProber (const Channel &s, Channel &d)
 
void setDst (Channel &d)
 Set new target channel. Needed in multichannel operations.
 
virtual void init ()
 Fills the segment having intensity between min and max. More...
 
void scan ()
 A convenience function for traversing a whole image. More...
 
void probe (int i, int j, bool HORIZONTAL)
 Start probings.
 
bool isValidPixel (int i, int j) const
 Returns isValidSegment(i,j) and !isVisited(i,j).
 

Public Attributes

const std::string & stats
 
SegmentStatistics statistics
 
- Public Attributes inherited from SegmentProber< T, D, SegmentProberConf< T, D > >
ProberControlcontrol
 
conf_t conf
 
const Channelsrc
 
Channeldst
 

Protected Member Functions

virtual void clear ()
 Called before processing each segment. Compare with init(), which is called once for each image. More...
 
virtual void update (int i, int j)
 Application dependent operation performed in each segment location (i,j).
 
- Protected Member Functions inherited from SegmentProber< T, D, SegmentProberConf< T, D > >
virtual bool isValidMove (int i0, int j0, int i, int j) const
 Application dependent, to be redefined. Note: assumes checked coordinates. More...
 
virtual void visit (int i, int j)
 Visiting a single pixel when not coming from any direction. More...
 
virtual bool isVisited (int i, int j) const
 Experimental.
 
bool move (int &i, int &j)
 Try to move; change coords in success, else keep them intact.
 
void scanHorzProbeVert (int i, int j)
 A semi-recursive approach that turns the 2D recursion to 1D traversal + 1D recursion. More...
 
void scanVertProbeHorz (int i, int j)
 

Additional Inherited Members

- Protected Attributes inherited from SegmentProber< T, D, SegmentProberConf< T, D > >
SimpleProberControl basicControl
 

Detailed Description

template<class T, class D>
class drain::image::SegmentStatisticsProber< T, D >

A helper class applied by FloodFillOp and SegmentAreaOp.

Template Parameters
T- type of the source image (int by default, but should be floating-type, if src is).
D- type of the destination image, the image to be filled.
Author
Marku.nosp@m.s.Pe.nosp@m.ura@f.nosp@m.mi.f.nosp@m.i

Member Function Documentation

◆ clear()

virtual void clear ( )
inlineprotectedvirtual

Called before processing each segment. Compare with init(), which is called once for each image.

Application dependent initialisation for statistics updated with update(int i, int j) function.

Reimplemented from SegmentProber< T, D, SegmentProberConf< T, D > >.

◆ isValidSegment()

virtual bool isValidSegment ( int  i,
int  j 
) const
inlinevirtual

Application dependent, to be redefined. Assumes checked coordinates.

Determines if the current position is within a segment. The criterion of "segment" depends on the application.

Note: does not check coordinates, assumes them to be checked by the calling scope.

Implements SegmentProber< T, D, SegmentProberConf< T, D > >.


The documentation for this class was generated from the following file: