A DIRECTED recursive method for visiting pixels of a segment in an image.
More...
#include <SuperProber.h>
|
| SuperProber (const Channel &s, Channel &d) |
|
virtual void | clear () |
| Called before processing each segment. Compare with init(), which is called once for each image. More...
|
|
virtual void | update (const Position &pos) |
| Application dependent operation performed in each segment location (i,j).
|
|
virtual void | visit2 (const Position &pos) |
|
virtual bool | isValidSegment (int i, int j) const |
| Application dependent, to be redefined. Assumes checked coordinates. More...
|
|
virtual bool | isNewSegment (const Position &pos, Direction::value_t dir) const |
| Application dependent. Assumes checked coordinates. More...
|
|
bool | checkNext (Position &pos, Direction::value_t dir, TreeSVG &tree) |
|
void | probe2 (Position pos, Direction::value_t dir, TreeSVG &tree) |
|
| 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).
|
|
|
typedef int | src_t |
|
typedef int | dst_t |
|
typedef SuperProberConf | conf_t |
|
virtual bool | isValidMove (int i0, int j0, int i, int j) const |
| Application dependent, to be redefined. Note: assumes checked coordinates. More...
|
|
virtual void | update (int i, int j) |
| Application dependent operation performed in each segment location (i,j).
|
|
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) |
|
SimpleProberControl | basicControl |
|
A DIRECTED recursive method for visiting pixels of a segment in an image.
A helper class applied by FloodFillOp and SegmentAreaOp.
- Template Parameters
-
S | - storage type of the source image data (int by default, but should be floating-type, if src is). |
D | - storage type of the destination image data |
C | - configuration type, |
- Author
- Marku.nosp@m.s.Pe.nosp@m.ura@f.nosp@m.mi.f.nosp@m.i
◆ clear()
◆ isNewSegment()
virtual bool isNewSegment |
( |
const Position & |
pos, |
|
|
Direction::value_t |
dir |
|
) |
| const |
|
inlinevirtual |
Application dependent. Assumes checked coordinates.
- Parameters
-
pos | - new position (validated coordinates) |
dir | - direction of entry (from outside to inside [potential new segment]) |
- Returns
- - true, if this pixel belongs to a new segment, and false if probing can continue
◆ 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< int, int, SuperProberConf >.
◆ probe2()
void probe2 |
( |
Position |
pos, |
|
|
Direction::value_t |
dir, |
|
|
TreeSVG & |
tree |
|
) |
| |
|
inline |
TODO: Macro turn -> test -> complete with template
The documentation for this class was generated from the following file: