31#ifndef PROBING_CRITERIA_H 
   32#define PROBING_CRITERIA_H 
   37#include "ImageChannel.h" 
   39#include "CoordinateHandler.h" 
   62    typedef unsigned char marker_t;
 
   73        return (markerImage.at(pos.i, pos.j) > 0); 
 
 
   77    void markVisited(
const Position & pos){
 
   79        markerImage.at(pos.i, pos.j) = visitedMarker;
 
   99        markerImage.at(pos.i, pos.j) |= dir;
 
 
  113        if (handler.
handle(pos.i, pos.j)){
 
  117            markerImage.at(pos.i, pos.j) |= DIR_TURN_DEG(dir, 180);
 
 
  128        return (dir & markerImage.at(pos.i, pos.j)) == 0;
 
 
  133    bool isValidPixel(
const Channel & src, 
const Position & pos) 
const = 0;
 
  136    typedef enum {MOVE_ACCEPTED=0, COORD_ERROR=1, DIR_ERROR=2} move_status;
 
  140    move_status move(
Position & pos, Direction::value_t dir)
 const {
 
  145        if (!handler.
handle(pos2)){ 
 
  148                return MOVE_ACCEPTED;
 
  185    CoordinateHandler2D handler;
 
  188    ImageT<marker_t> markerImage;
 
  191    marker_t visitedMarker = 0xff;
 
 
  201        return src.
get<
int>(pos.i, pos.j) > threshold;
 
  215    bool isVisited(int i) const override {
 
  216        return (i == visitedMarker);
 
 
Image with static geometry.
Definition ImageChannel.h:60
virtual coord_overflow_t handle(int &x, int &y) const
Ensures the validity of the coordinates. If inside limits, arguments (x,y) remain intact and 0 is ret...
Definition CoordinateHandler.h:205
T get(size_t i) const
Gets the intensity at location i. See address().
Definition ImageFrame.h:251
Definition DataSelector.cpp:1277
static const std::map< value_t, Position > offset
Opposite direction.
Definition Direction.h:173
Definition Direction.h:46
Container for parameters of SegmentProber.
Definition ProbingControl.h:60
virtual bool isValidDir(const Position &pos, Direction::value_t dir) const
Direction NONE is always valid,.
Definition ProbingControl.h:127
bool markBlockedOut(Position pos, Direction::value_t dir)
Disable entry to position pos from direction dir inverted .
Definition ProbingControl.h:111
virtual bool isVisited(const Position &pos) const
NEW.
Definition ProbingControl.h:71
void markBlockedIn(const Position &pos, Direction::value_t dir)
Disable exit from position pos towards direction dir.
Definition ProbingControl.h:98
Definition ProbingControl.h:195