diff --git a/Code/FBSD/ConvexHull/antipodal.cpp b/Code/FBSD/ConvexHull/antipodal.cpp index 738fbce9745872e36f1e5d8a64ce794a16decdff..16dfcdd6dd7d552cbd2ebdbb196c7fcc2420a928 100755 --- a/Code/FBSD/ConvexHull/antipodal.cpp +++ b/Code/FBSD/ConvexHull/antipodal.cpp @@ -47,7 +47,7 @@ void Antipodal::init (CHVertex *v1, CHVertex *v2, CHVertex *v3) } else { - if (v2->get (iy) <= v3->get (iy)) // EQUIV : au lieu de "<" !!! + if (v2->get (iy) <= v3->get (iy)) // EQUIV : rather than "<" !!! { vpt = v3; ept1 = v1; diff --git a/Code/FBSD/ConvexHull/antipodal.h b/Code/FBSD/ConvexHull/antipodal.h index df2b9a5590bbe7448570ddf1770e91972c74c57e..d277d15088d4c450d25b22a80495e3ae26923ad5 100755 --- a/Code/FBSD/ConvexHull/antipodal.h +++ b/Code/FBSD/ConvexHull/antipodal.h @@ -2,78 +2,117 @@ #define ANTIPODAL_H #include "chvertex.h" -#include <cstdlib> - -using namespace std; /** * @class Antipodal antipodal.h - * \brief Antipodal pair of a convex hull. - * \author {P. Even} + * \brief Horizontal or vertical antipodal pair of a polyline convex hull. */ class Antipodal { public: - /** Builds an empty (undetermined) horizontal antipodal pair. */ + /** + * \brief Builds an empty (undetermined) horizontal antipodal pair. + */ Antipodal (); - /** Sets the coordinates for a vertical antipodal pair. */ + /** + * \brief Aligns the antipodal pair on vertical direction. + */ inline void setVertical () { ix = 1; iy = 0; } - /** Initializes the vertex/edge pair from three unordered vertices. */ - void init (CHVertex *vpt, CHVertex *ept1, CHVertex *ept2); + /** + * \brief Initializes the vertex/edge pair from three unordered vertices. + * @param v1 First vertex. + * @param v2 Second vertex. + * @param v3 Third vertex. + */ + void init (CHVertex *v1, CHVertex *v2, CHVertex *v3); - /** Sets the vertex and the edge of the antipodal pair. */ + /** + * \brief Sets both vertex and edge of the antipodal pair. + * @param pt New vertex. + * @param es Start vertex of new edge. + * @param ee End vertex of new edge. + */ inline void setVertexAndEdge (CHVertex *pt, CHVertex *es, CHVertex *ee) { - vpt = pt; ept1 = es; ept2 = ee; } + vpt = pt; ept1 = es; ept2 = ee; } - /** Sets the vertex of the antipodal pair. */ + /** + * \brief Sets the vertex of the antipodal pair. + * @param pt New vertex. + */ inline void setVertex (CHVertex *pt) { vpt = pt; } - /** Sets the edge of the antipodal pair. */ - inline void setEdge (CHVertex *pt1, CHVertex *pt2) { ept1 = pt1; ept2 = pt2; } + /** + * \brief Sets the edge of the antipodal pair. + * @param es Start vertex of new edge. + * @param ee End vertex of new edge. + */ + inline void setEdge (CHVertex *es, CHVertex *ee) { + ept1 = es; ept2 = ee; } - /** Returns the vertex of the antipodal pair. */ + /** + * \brief Returns the vertex of the antipodal pair. + */ inline CHVertex *vertex () const { return vpt; } - /** Returns the leaning edge start of the antipodal pair. */ + /** + * \brief Returns the leaning edge start vertex of the antipodal pair. + */ inline CHVertex *edgeStart () const { return ept1; } - /** Returns the leaning edge end of the antipodal pair. */ + /** + * \brief Returns the leaning edge end vertex of the antipodal pair. + */ inline CHVertex *edgeEnd () const { return ept2; } /** - * Returns the antipodal pair horizontal thickness. + * \brief Returns the antipodal pair horizontal thickness. * It is computed as the vertex horizontal distance to the edge. */ AbsRat thickness () const; /** - * Computes the antipodal pair horizontal thickness. + * \brief Computes the antipodal pair horizontal thickness. * It is the vertex horizontal distance to the edge. * @param num Numerator of the thickness rational value. * @param den Denominator of the thickness rational value. */ //void thickness (int &num, int &den) const; - /** Returns the remainder of the edge line equation for given vertex. */ + /** + * \brief Returns the remainder of the edge line equation for given vertex. + * @param v Given vertex. + */ int remainder (CHVertex *v) const; - /** Checks if the edge lies in the first quadrant (x = y). */ + /** + * \brief Checks if the antipodal edge lies in first quadrant. + * More formally, checks if sign(Ex) = sign(Ey). + */ bool edgeInFirstQuadrant () const; - /** Gets the edge vector Y coordinate. */ + /** + * \brief Returns the edge vector Y coordinate. + */ int getA () const; - /** Gets the edge vector X coordinate. */ + /** + * \brief Returns the edge vector X coordinate. + */ int getB () const; - /** Updates the antipodal pair after the insertion of a new vertex. */ + /** + * \brief Updates the antipodal pair after the insertion of a new vertex. + * @param pt Pointer to inserted vertex. + */ void update (CHVertex *pt); - /** Returns a string that represents the antipodal pair. */ + /** + * \brief Returns a string that represents the antipodal pair. + */ // friend ostream& operator<< (ostream &os, const Antipodal &ap); @@ -86,9 +125,9 @@ protected: /** Leaning vertex. */ CHVertex *vpt; - /** Start of the leaning edge. */ + /** Start vertex of leaning edge. */ CHVertex *ept1; - /** End of the leaning edge. */ + /** End vertex of leaning edge. */ CHVertex *ept2; }; diff --git a/Code/FBSD/ConvexHull/chvertex.h b/Code/FBSD/ConvexHull/chvertex.h index 1ed0c061f55e39e8808af091e30b2c2cf16cfd48..6c7ff72fe6ecac0f598ff775f079e6b70b2adedf 100755 --- a/Code/FBSD/ConvexHull/chvertex.h +++ b/Code/FBSD/ConvexHull/chvertex.h @@ -2,53 +2,92 @@ #define CHVERTEX_H #include "pt2i.h" -#include <cstdlib> /** * @class CHVertex chvertex.h - * \brief Chained point with two adjacent points. - * \author {P. Even} + * \brief Chained vertex with two adjacent points, on left and right. */ class CHVertex : public Pt2i { public: - /** Builds a default vertex. */ + /** + * \brief Builds a default vertex. + */ CHVertex (); - /** Builds a vertex on given coordinates. */ + /** + * \brief Builds a vertex on given coordinates. + * @param x First ccordinate value. + * @param y Second ccordinate value. + */ CHVertex (int x, int y); - /** Builds a vertex at the position of the given point. */ + /** + * \brief Builds a vertex at position of given point. + * @param p Reference to given point. + */ CHVertex (const Pt2i &p); + + /** + * \brief Deletes the vertex. + */ ~CHVertex (); + /** + * \brief Returns a pointer to adjacent vertex on left side. + */ inline CHVertex *left () const { return lv; } + + /** + * \brief Returns a pointer to adjacent vertex on right side. + */ inline CHVertex *right () const { return rv; } + + /** + * \brief Sets adjacent vertex on left side. + * @param v Pointer to new adjacent vertex. + */ inline void setLeft (CHVertex *v) { lv = v; } + + /** + * \brief Sets adjacent vertex on right side. + * @param v Pointer to new adjacent vertex. + */ inline void setRight (CHVertex *v) { rv = v; } - /** Returns the vector product of vector (this, pt) and vector (vx, vy) + /** + * \brief Returns the cross product of vector (pt - this) and vector (vx, vy). + * The cross product of U and V is defined by: CP = Ux * Vy - Vx * Uy. + * @param pt Given end point. + * @param vx First coordinate of given vector. + * @param vy Second coordinate of given vector. */ inline int vprod (CHVertex *pt, int vx, int vy) const { - return ((pt->xp - xp) * vy - vx * (pt->yp - yp)); } + return ((pt->xp - xp) * vy - vx * (pt->yp - yp)); } - /** Returns the vector product of vector (this, p2) and vector (p3, p4) + /** + * \brief Returns the cross product of vector (p2 - this) and vector (p4 - p3) + * The cross product of U and V is defined by: CP = Ux * Vy - Vx * Uy. + * @param p2 First end point. + * @param p3 Second start point. + * @param p4 Second end point. */ inline int vprod (CHVertex *p2, CHVertex *p3, CHVertex *p4) const { - return ((p2->xp - xp) * (p4->yp - p3->yp) - - (p4->xp - p3->xp) * (p2->yp - yp)); } + return ((p2->xp - xp) * (p4->yp - p3->yp) + - (p4->xp - p3->xp) * (p2->yp - yp)); } // friend ostream& operator<< (ostream &os, const CHVertex &v); protected: - /** Adjacent vertex to the left. */ + /** Adjacent vertex on left side. */ CHVertex *lv; - /** Adjacent vertex to the right. */ + /** Adjacent vertex on right side. */ CHVertex *rv; + }; #endif diff --git a/Code/FBSD/ConvexHull/convexhull.cpp b/Code/FBSD/ConvexHull/convexhull.cpp index 7256ab482c7ecb8733841234f139ae761ee3e6a2..c05de5facf518e7ce1eff4c90fa2a4031131e551 100755 --- a/Code/FBSD/ConvexHull/convexhull.cpp +++ b/Code/FBSD/ConvexHull/convexhull.cpp @@ -76,40 +76,40 @@ void ConvexHull::restore () } -bool ConvexHull::addPoint (const Pt2i &pix, bool toleft) +bool ConvexHull::addPoint (const Pt2i &pt, bool toleft) { - if (inHull (pix, toleft)) return false; - CHVertex *pt = new CHVertex (pix); + if (inHull (pt, toleft)) return false; + CHVertex *vx = new CHVertex (pt); lastToLeft = toleft; - gbg.push_back (pt); + gbg.push_back (vx); preserve (); - insert (pt, toleft); - aph.update (pt); - apv.update (pt); + insert (vx, toleft); + aph.update (vx); + apv.update (vx); return true; } -bool ConvexHull::addPointDS (const Pt2i &pix, bool toleft) +bool ConvexHull::addPointDS (const Pt2i &pt, bool toleft) { - CHVertex *pt = new CHVertex (pix); + CHVertex *vx = new CHVertex (pt); lastToLeft = toleft; - gbg.push_back (pt); + gbg.push_back (vx); preserve (); - insertDS (pt, toleft); - aph.update (pt); - apv.update (pt); + insertDS (vx, toleft); + aph.update (vx); + apv.update (vx); return true; } -bool ConvexHull::moveLastPoint (const Pt2i &pix) +bool ConvexHull::moveLastPoint (const Pt2i &pos) { restore (); - if (inHull (pix, lastToLeft)) return false; + if (inHull (pos, lastToLeft)) return false; gbg.pop_back (); preserve (); - addPoint (pix, lastToLeft); + addPoint (pos, lastToLeft); return true; } @@ -133,11 +133,11 @@ void ConvexHull::antipodalEdgeAndVertex (Pt2i &s, Pt2i &e, Pt2i &v) const } -bool ConvexHull::inHull (const Pt2i &pix, bool toleft) const +bool ConvexHull::inHull (const Pt2i &pt, bool toleft) const { CHVertex *ext = (toleft ? leftVertex : rightVertex); - return (pix.toLeftOrOn (*ext, *(ext->right ())) - && pix.toLeftOrOn (*(ext->left ()), *ext)); + return (pt.toLeftOrOn (*ext, *(ext->right ())) + && pt.toLeftOrOn (*(ext->left ()), *ext)); } diff --git a/Code/FBSD/ConvexHull/convexhull.h b/Code/FBSD/ConvexHull/convexhull.h index 4d06a05e9a05fdc1bc6e90ae8923fbd4a32238d3..98294bd6c2cb0aaad40f03e169eb54a10c4987df 100755 --- a/Code/FBSD/ConvexHull/convexhull.h +++ b/Code/FBSD/ConvexHull/convexhull.h @@ -1,17 +1,13 @@ #ifndef CONVEXHULL #define CONVEXHULL - #include <vector> #include "antipodal.h" -using namespace std; - /** * @class ConvexHull convexhull.h * \brief Convex hull of a polyline. - * \author {P. Even} */ class ConvexHull { @@ -21,15 +17,15 @@ public: * \brief Creates a convex hull from a triangle. * Be very careful with the points ordering : lpt, cpt, then rpt. * Ensure that the points are NOT COLINEAR (not tested here). - * @param lpt : left end of the polyline. - * @param cpt : center of the polyline. - * @param rpt : right end of the polyline. + * @param lpt : left end vertex of the polyline. + * @param cpt : center vertex of the polyline. + * @param rpt : right end vertex of the polyline. */ ConvexHull (const Pt2i &lpt, const Pt2i &cpt, const Pt2i &rpt); /** * \brief Deletes the convex hull. - * Removes all the registred vertices. + * Removes all registered vertices. */ ~ConvexHull (); @@ -41,84 +37,91 @@ public: /** * \brief Appends a new point at one side of the convex hull. + * @param pt Reference to the point to add. + * @param Side at which the point is added. */ - bool addPoint (const Pt2i &pix, bool toleft); + bool addPoint (const Pt2i &pt, bool toleft); /** * \brief Appends a new point at one side of the convex hull. - * To be used with directional scans : - * In that case, added point can not be inside the hull. + * To be used with directional scans: + * in that case, added point can not be inside the hull. + * @param pt Reference to the point to add. + * @param toleft Add the point at left side if true, right side otherwise. */ - bool addPointDS (const Pt2i &pix, bool toleft); + bool addPointDS (const Pt2i &pt, bool toleft); /** - * \brief Moves the last entered point and returns the success. + * \brief Moves the last inserted point and returns the success. + * @param pos New position for the last point. */ - bool moveLastPoint (const Pt2i &pix); + bool moveLastPoint (const Pt2i &pos); /** - * \brief Checks whether the line to the given point crosses the hull. + * \brief Checks whether the line to given point crosses the hull. + * @param pt Given point. + * @param toleft Set to true if the point was added on left side. */ - bool inHull (const Pt2i &pix, bool toleft) const; + bool inHull (const Pt2i &pt, bool toleft) const; /** - * Returns the antipodal vertex. - * @param s Antipodal edge start. - * @param e Antipodal edge end. - * @param v Antipodal vertex. + * \brief Returns the antipodal edge and vertex. + * @param s Edge start vertex. + * @param e Edge end vertex. + * @param v Vertex. */ void antipodalEdgeAndVertex (Pt2i &s, Pt2i &e, Pt2i &v) const; /** - * Returns the convex hull thickness. + * \brief Returns the convex hull thickness. * The thickness is the minimal vertical or horizontal thickness. * It is computed as the minimal value of both antipodal pairs. */ AbsRat thickness () const; /** - * Returns a string that represents the convex hull. + * \brief Returns a string that represents the convex hull. */ // friend ostream& operator<< (ostream &os, const ConvexHull &ch); /** - * Returns the first vertex of the convex hull. + * \brief Returns the first (left) vertex of the convex hull. */ inline CHVertex *getFirstVertex () const { return (leftVertex); } /** - * Returns the last vertex of the convex hull. + * \brief Returns the last (right) vertex of the convex hull. */ inline CHVertex *getLastVertex () const { return (rightVertex); } /** - * Returns the horizontal antipodal vertex. + * \brief Returns the horizontal antipodal vertex. */ inline CHVertex *getAphVertex () const { return (aph.vertex ()); } /** - * Returns the horizontal antipodal edge start. + * \brief Returns the horizontal antipodal edge start vertex. */ inline CHVertex *getAphEdgeStart () const { return (aph.edgeStart ()); } /** - * Returns the horizontal antipodal edge end. + * \brief Returns the horizontal antipodal edge end vertex. */ inline CHVertex *getAphEdgeEnd () const { return (aph.edgeEnd ()); } /** - * Returns the vertical antipodal vertex. + * \brief Returns the vertical antipodal vertex. */ inline CHVertex *getApvVertex () const { return (apv.vertex ()); } /** - * Returns the vertical antipodal edge start. + * \brief Returns the vertical antipodal edge start vertex. */ inline CHVertex *getApvEdgeStart () const { return (apv.edgeStart ()); } /** - * Returns the vertical antipodal edge end. + * \brief Returns the vertical antipodal edge end vertex. */ inline CHVertex *getApvEdgeEnd () const { return (apv.edgeEnd ()); } @@ -137,38 +140,57 @@ protected: /** Antipodal pair in vertical direction. */ Antipodal apv; - /** Registration of previous horizontal antipodal pair. */ - CHVertex *old_aph_vertex, *old_aph_edge_start, *old_aph_edge_end;; - /** Registration of previous vertical antipodal pair. */ - CHVertex *old_apv_vertex, *old_apv_edge_start, *old_apv_edge_end; - /** Registration of previous polyline left end point. */ + /** Registered vertex of previous horizontal antipodal pair. */ + CHVertex *old_aph_vertex; + /** Registered edge start of previous horizontal antipodal pair. */ + CHVertex *old_aph_edge_start; + /** Registered edge end of previous horizontal antipodal pair. */ + CHVertex *old_aph_edge_end; + /** Registered vertex of previous vertical antipodal pair. */ + CHVertex *old_apv_vertex; + /** Registered edge start of previous vertical antipodal pair. */ + CHVertex *old_apv_edge_start; + /** Registered edge end of previous vertical antipodal pair. */ + CHVertex *old_apv_edge_end; + /** Registered left end point of previous polyline. */ CHVertex *old_left; - /** Registration of previous polyline right end point. */ + /** Registered right end point of previous polyline. */ CHVertex *old_right; - /** Registration of previous connections. */ - CHVertex *lconnect, *ldisconnect, *rconnect, *rdisconnect; - - /** Collection of vertices for clearance. */ + /** Registered connected point to the left of previous polyline. */ + CHVertex *lconnect; + /** Registered disconnected point to the left of previous polyline. */ + CHVertex *ldisconnect; + /** Registered connected point to the right of previous polyline. */ + CHVertex *rconnect; + /** Registered disconnected point to the right of previous polyline. */ + CHVertex *rdisconnect; + + /** Collection of released vertices for clearance. */ vector<CHVertex*> gbg; private: /** - * Stores the convexhull features before a modification. + * \brief Stores convex hull features before a modification. */ void preserve (); /** - * Inserts a new point into the convex hull. + * \brief Inserts a new point into the convex hull. + * @param pt Pointer to the point to add. + * @param toleft Adds to left if true, to right otherwise. */ void insert (CHVertex *pt, bool toleft); /** - * Inserts a new point into the convex hull. + * \brief Inserts a new point into the convex hull. * To be used with directional scans : * In that case, opposite ends of the polyline can never pass each other. + * @param pt Pointer to the point to add. + * @param toleft Adds to left if true, to right otherwise. */ void insertDS (CHVertex *pt, bool toleft); + }; #endif diff --git a/Code/FBSD/DirectionalScanner/adaptivescannero1.cpp b/Code/FBSD/DirectionalScanner/adaptivescannero1.cpp index 26dc811d073589f8b57c1f666286971995defc3f..3c197f6ddf17ac43276393f04eb5754c3a849d0e 100755 --- a/Code/FBSD/DirectionalScanner/adaptivescannero1.cpp +++ b/Code/FBSD/DirectionalScanner/adaptivescannero1.cpp @@ -1,8 +1,6 @@ -#include <cstdlib> #include "adaptivescannero1.h" - AdaptiveScannerO1::AdaptiveScannerO1 ( int xmin, int ymin, int xmax, int ymax, int a, int b, int c, @@ -25,7 +23,6 @@ AdaptiveScannerO1::AdaptiveScannerO1 ( } - AdaptiveScannerO1::AdaptiveScannerO1 ( int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, @@ -69,7 +66,6 @@ AdaptiveScannerO1::AdaptiveScannerO1 ( } - AdaptiveScannerO1::AdaptiveScannerO1 ( int xmin, int ymin, int xmax, int ymax, int a, int b, diff --git a/Code/FBSD/DirectionalScanner/adaptivescannero1.h b/Code/FBSD/DirectionalScanner/adaptivescannero1.h index da2e38bbd8acd5204e9dea053b1217db4c782037..c6423683b06f2a5e7810bdcf4fb833fbe7785da1 100755 --- a/Code/FBSD/DirectionalScanner/adaptivescannero1.h +++ b/Code/FBSD/DirectionalScanner/adaptivescannero1.h @@ -3,84 +3,71 @@ #include "directionalscanner.h" -using namespace std; - - /** - * @class Adaptive dynamicalscannero1.h + * @class Adaptive adaptivescannero1.h * \brief Adaptive directional scanner for the 1st octant. */ class AdaptiveScannerO1 : public DirectionalScanner { - public: /** - * @fn AdaptiveScanner01(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int mu2, - * int nbs, bool *steps, int sx, int sy) * \brief Creates an adaptive DS from pattern, start and upper bound. * The scan strip is composed of parallel scan lines, the first one being * defined by a start point, a line pattern, and an upper bound. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c y intercept parameter of the upper bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param sx abscissae of the central scan start point - * @param sy ordinate of the central scan start point + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c Value of parameter 'c' of the upper bounding line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param sx X-coordinate of the central scan start point. + * @param sy Y-coordinate of the central scan start point. */ AdaptiveScannerO1 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c, int nbs, bool *steps, int sx, int sy); /** - * @fn AdaptiveScanner01(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int c1, int c2, - * int nbs, bool *steps, int cx, int cy) * \brief Creates an adaptive DS from pattern, center and bounds. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, upper and lower bounds. - * @param xmin left border of the scan area - * @param xmax right border of the scan area - * @param ymin low border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c1 y intercept parameter of one of the bounds - * @param c2 y intercept parameter of the other bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the support discrete line. + * @param b Value of parameter 'b' of the support discrete line. + * @param c1 Value of parameter 'c' of one of the support lines. + * @param c2 Value of parameter 'c' of the other support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. */ AdaptiveScannerO1 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, int nbs, bool *steps, int cx, int cy); /** - * @fn AdaptiveScanner01(int xmin, int ymin, int xmax, int ymax, - * int a, int b, - * int nbs, bool *steps, int cx, int cy, int length) - * \brief Creates an adaptive DS from pattern, center and length . + * \brief Creates an adaptive DS from pattern, center and length. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, and a length value. - * @param xmin left border of the scan area - * @param xmax right border of the scan area - * @param ymin low border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center - * @param length length of a scan strip + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. + * @param length Length of a scan strip. */ AdaptiveScannerO1 (int xmin, int ymin, int xmax, int ymax, int a, int b, @@ -88,59 +75,60 @@ public: int cx, int cy, int length); /** - * @fn DirectionalScanner *getCopy (); * \brief Returns a copy of the directional scanner. */ DirectionalScanner *getCopy (); /** - * @fn first(vector<Pt2i> &scan) * \brief Returns the central scan. - * Fills in the vector with the central scan and returns its size. - * @param scan vectors of points to be filled in. + * Adds central scan points to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int first (vector<Pt2i> &scan) const; /** - * @fn nextOnLeft(vector<Pt2i> &scan) * \brief Returns the next scan on the left. - * Fills in the vector with the next scan on left and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next left scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnLeft (vector<Pt2i> &scan); /** - * @fn nextOnRight(vector<Pt2i> &scan) * \brief Returns the next scan on the right. - * Fills in the vector with the next scan on right and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next right scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnRight (vector<Pt2i> &scan); /** - * @fn bindTo(int a, int b, int c) * \brief Binds the scan stripe to wrap the given digital line. - * Resets the bounding lines parameters to center on the given line. - * @param a New value for the 'a' parameter of the current scan stripe. - * @param b New value for the 'b' parameter of the current scan stripe. - * @param c New value for the medial axis of the current scan stripe. + * Resets bounding lines parameters to center the scan stripe on given line. + * @param a Parameter 'a' of given digital line. + * @param b Parameter 'b' of given digital line. + * @param c Parameter 'c' of given digital line. */ void bindTo (int a, int b, int c); protected : - - AdaptiveScannerO1 () { } - /** Coefficients of the template discrete support lines */ - int templ_a, templ_b, templ_nu; - - /** Shift coefficient of the discrete lower support line */ + /** Parameter 'a' of template support discrete line template. */ + int templ_a; + /** Parameter 'b' of template support discrete line template. */ + int templ_b; + /** Parameter 'nu' of template support discrete line template. */ + int templ_nu; + + /** Shift parameter of the lower support discrete line. */ int dlc1; /** - * @fn AdaptiveScannerO1(AdaptiveScannerO1 *ds) + * \brief Creates an empty adaptive directional scanner. + */ + AdaptiveScannerO1 () { } + + /** * \brief Creates a copy of given directional scanner. * @param ds Source directional scanner. */ diff --git a/Code/FBSD/DirectionalScanner/adaptivescannero2.cpp b/Code/FBSD/DirectionalScanner/adaptivescannero2.cpp index 559c5d4bbab253eb86acbea4395ca2810f227f15..91f47d019f3b66872c35704311f30c17193db8b9 100755 --- a/Code/FBSD/DirectionalScanner/adaptivescannero2.cpp +++ b/Code/FBSD/DirectionalScanner/adaptivescannero2.cpp @@ -1,8 +1,6 @@ -#include <cstdlib> #include "adaptivescannero2.h" - AdaptiveScannerO2::AdaptiveScannerO2 ( int xmin, int ymin, int xmax, int ymax, int a, int b, int c, @@ -25,7 +23,6 @@ AdaptiveScannerO2::AdaptiveScannerO2 ( } - AdaptiveScannerO2::AdaptiveScannerO2 ( int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, @@ -69,7 +66,6 @@ AdaptiveScannerO2::AdaptiveScannerO2 ( } - AdaptiveScannerO2::AdaptiveScannerO2 ( int xmin, int ymin, int xmax, int ymax, int a, int b, diff --git a/Code/FBSD/DirectionalScanner/adaptivescannero2.h b/Code/FBSD/DirectionalScanner/adaptivescannero2.h index 11ec2d2fbbc18c4c467cd115142f3acc25281e73..2ab5bc89316044a794b27f86baefda0bd745f258 100755 --- a/Code/FBSD/DirectionalScanner/adaptivescannero2.h +++ b/Code/FBSD/DirectionalScanner/adaptivescannero2.h @@ -3,8 +3,6 @@ #include "directionalscanner.h" -using namespace std; - /** @@ -17,70 +15,61 @@ class AdaptiveScannerO2 : public DirectionalScanner public: /** - * @fn AdaptiveScanner02(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int mu2, - * int nbs, bool *steps, int sx, int sy) * \brief Creates an adaptive DS from pattern, start and upper bound. * The scan strip is composed of parallel scan lines, the first one being * defined by a start point, a line pattern, and an upper bound. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c y intercept parameter of the upper bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param sx abscissae of the central scan start point - * @param sy ordinate of the central scan start point + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c Value of parameter 'c' of the upper bounding line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param sx X-coordinate of the central scan start point. + * @param sy Y-coordinate of the central scan start point. */ AdaptiveScannerO2 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c, int nbs, bool *steps, int sx, int sy); /** - * @fn AdaptiveScanner02(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int c1, int c2, - * int nbs, bool *steps, int cx, int cy) * \brief Creates an adaptive DS from pattern, center and bounds. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, upper and lower bounds. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c1 y intercept parameter of one of the bounds - * @param c2 y intercept parameter of the other bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c1 Value of parameter 'c' of one of the support lines. + * @param c2 Value of parameter 'c' of the other support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. */ AdaptiveScannerO2 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, int nbs, bool *steps, int cx, int cy); /** - * @fn AdaptiveScanner02(int xmin, int ymin, int xmax, int ymax, - * int a, int b, - * int nbs, bool *steps, int cx, int cy, int length) * \brief Creates an adaptive DS from pattern, center and length. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, and a length value. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center - * @param length length of a scan strip + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. + * @param length Length of a scan strip. */ AdaptiveScannerO2 (int xmin, int ymin, int xmax, int ymax, int a, int b, @@ -88,59 +77,60 @@ public: int cx, int cy, int length); /** - * @fn DirectionalScanner *getCopy (); * \brief Returns a copy of the directional scanner. */ DirectionalScanner *getCopy (); /** - * @fn first(vector<Pt2i> &scan) * \brief Returns the central scan. - * Fills in the vector with the central scan and returns its size. - * @param scan vectors of points to be filled in. + * Adds central scan points to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int first (vector<Pt2i> &scan) const; /** - * @fn nextOnLeft(vector<Pt2i> &scan) * \brief Returns the next scan on the left. - * Fills in the vector with the next scan on left and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next left scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnLeft (vector<Pt2i> &scan); /** - * @fn nextOnRight(vector<Pt2i> &scan) * \brief Returns the next scan on the right. - * Fills in the vector with the next scan on right and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next right scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnRight (vector<Pt2i> &scan); /** - * @fn bindTo(int a, int b, int c) * \brief Binds the scan stripe to wrap the given digital line. - * Resets the bounding lines parameters to center on the given line. - * @param a New value for the 'a' parameter of the current scan stripe. - * @param b New value for the 'b' parameter of the current scan stripe. - * @param c New value for the medial axis of the current scan stripe. + * Resets bounding lines parameters to center the scan stripe on given line. + * @param a Parameter 'a' of given digital line. + * @param b Parameter 'b' of given digital line. + * @param c Parameter 'c' of given digital line. */ void bindTo (int a, int b, int c); protected : - AdaptiveScannerO2 () { } - - /** Coefficients of the template discrete support lines */ - int templ_a, templ_b, templ_nu; + /** Parameter 'a' of template support discrete line template. */ + int templ_a; + /** Parameter 'b' of template support discrete line template. */ + int templ_b; + /** Parameter 'nu' of template support discrete line template. */ + int templ_nu; - /** Shift coefficient of the discrete lower support line */ + /** Shift parameter of the lower support discrete line */ int dlc1; /** - * @fn AdaptiveScannerO2(AdaptiveScannerO2 *ds) + * \brief Creates an empty adaptive directional scanner. + */ + AdaptiveScannerO2 () { } + + /** * \brief Creates a copy of given directional scanner. * @param ds Source directional scanner. */ diff --git a/Code/FBSD/DirectionalScanner/adaptivescannero7.cpp b/Code/FBSD/DirectionalScanner/adaptivescannero7.cpp index 0192faa0617d5f0924396d354ec2e74739c7d7f3..7969b7e9954c8a6528042adcdbd849ebb453ae34 100755 --- a/Code/FBSD/DirectionalScanner/adaptivescannero7.cpp +++ b/Code/FBSD/DirectionalScanner/adaptivescannero7.cpp @@ -1,8 +1,6 @@ -#include <cstdlib> #include "adaptivescannero7.h" - AdaptiveScannerO7::AdaptiveScannerO7 ( int xmin, int ymin, int xmax, int ymax, int a, int b, int c, @@ -25,7 +23,6 @@ AdaptiveScannerO7::AdaptiveScannerO7 ( } - AdaptiveScannerO7::AdaptiveScannerO7 ( int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, @@ -69,7 +66,6 @@ AdaptiveScannerO7::AdaptiveScannerO7 ( } - AdaptiveScannerO7::AdaptiveScannerO7 ( int xmin, int ymin, int xmax, int ymax, int a, int b, diff --git a/Code/FBSD/DirectionalScanner/adaptivescannero7.h b/Code/FBSD/DirectionalScanner/adaptivescannero7.h index 6d0a5a591e45d2295a5dea3df56ac76639a782a1..8bfbef17d4e5e0d917a304ee01453c3b984f13e2 100755 --- a/Code/FBSD/DirectionalScanner/adaptivescannero7.h +++ b/Code/FBSD/DirectionalScanner/adaptivescannero7.h @@ -3,9 +3,6 @@ #include "directionalscanner.h" -using namespace std; - - /** * @class AdaptiveScannerO7 adaptivescannero7.h @@ -17,70 +14,61 @@ class AdaptiveScannerO7 : public DirectionalScanner public: /** - * @fn AdaptiveScanner07(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int mu2, - * int nbs, bool *steps, int sx, int sy) * \brief Creates an adaptive DS from pattern, start and upper bound. * The scan strip is composed of parallel scan lines, the first one being * defined by a start point, a line pattern, and an upper bound. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c y intercept parameter of the upper bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param sx abscissae of the central scan start point - * @param sy ordinate of the central scan start point + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c Value of parameter 'c' of the upper bounding line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param sx X-coordinate of the central scan start point. + * @param sy Y-coordinate of the central scan start point. */ AdaptiveScannerO7 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c, int nbs, bool *steps, int sx, int sy); /** - * @fn AdaptiveScanner07(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int c1, int c2, - * int nbs, bool *steps, int cx, int cy) * \brief Creates an adaptive DS from pattern, center and bounds. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, upper and lower bounds. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c1 y intercept parameter of one of the bounds - * @param c2 y intercept parameter of the other bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c1 Value of parameter 'c' of one of the support lines. + * @param c2 Value of parameter 'c' of the other support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. */ AdaptiveScannerO7 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, int nbs, bool *steps, int cx, int cy); /** - * @fn AdaptiveScanner07(int xmin, int ymin, int xmax, int ymax, - * int a, int b, - * int nbs, bool *steps, int cx, int cy, int length) * \brief Creates an adaptive DS from pattern, center and length. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, and a length value. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center - * @param length length of a scan strip + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. + * @param length Length of a scan strip. */ AdaptiveScannerO7 (int xmin, int ymin, int xmax, int ymax, int a, int b, @@ -88,59 +76,60 @@ public: int cx, int cy, int length); /** - * @fn DirectionalScanner *getCopy (); * \brief Returns a copy of the directional scanner. */ DirectionalScanner *getCopy (); /** - * @fn first(vector<Pt2i> &scan) * \brief Returns the central scan. - * Fills in the vector with the central scan and returns its size. - * @param scan vectors of points to be filled in. + * Adds central scan points to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int first (vector<Pt2i> &scan) const; /** - * @fn nextOnLeft(vector<Pt2i> &scan) * \brief Returns the next scan on the left. - * Fills in the vector with the next scan on left and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next left scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnLeft (vector<Pt2i> &scan); /** - * @fn nextOnRight(vector<Pt2i> &scan) * \brief Returns the next scan on the right. - * Fills in the vector with the next scan on right and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next right scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnRight (vector<Pt2i> &scan); /** - * @fn bindTo(int a, int b, int c) * \brief Binds the scan stripe to wrap the given digital line. - * Resets the bounding lines parameters to center on the given line. - * @param a New value for the 'a' parameter of the current scan stripe. - * @param b New value for the 'b' parameter of the current scan stripe. - * @param c New value for the medial axis of the current scan stripe. + * Resets bounding lines parameters to center the scan stripe on given line. + * @param a Parameter 'a' of given digital line. + * @param b Parameter 'b' of given digital line. + * @param c Parameter 'c' of given digital line. */ void bindTo (int a, int b, int c); protected : - AdaptiveScannerO7 () { } - - /** Coefficients of the template discrete support lines */ - int templ_a, templ_b, templ_nu; + /** Parameter 'a' of template support discrete line template. */ + int templ_a; + /** Parameter 'b' of template support discrete line template. */ + int templ_b; + /** Parameter 'nu' of template support discrete line template. */ + int templ_nu; - /** Shift coefficient of the discrete lower support line */ + /** Shift parameter of the lower support discrete line */ int dlc1; /** - * @fn AdaptiveScannerO7(AdaptiveScannerO7 *ds) + * \brief Creates an empty adaptive directional scanner. + */ + AdaptiveScannerO7 () { } + + /** * \brief Creates a copy of given directional scanner. * @param ds Source directional scanner. */ diff --git a/Code/FBSD/DirectionalScanner/adaptivescannero8.cpp b/Code/FBSD/DirectionalScanner/adaptivescannero8.cpp index 7e0ccc2b05bb3110a4a28f5dfdaabc3bdbf7768d..ecef7e772197f839febf33aaec2329fc9e96d85f 100755 --- a/Code/FBSD/DirectionalScanner/adaptivescannero8.cpp +++ b/Code/FBSD/DirectionalScanner/adaptivescannero8.cpp @@ -1,8 +1,6 @@ -#include <cstdlib> #include "adaptivescannero8.h" - AdaptiveScannerO8::AdaptiveScannerO8 ( int xmin, int ymin, int xmax, int ymax, int a, int b, int c, @@ -25,7 +23,6 @@ AdaptiveScannerO8::AdaptiveScannerO8 ( } - AdaptiveScannerO8::AdaptiveScannerO8 ( int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, @@ -69,7 +66,6 @@ AdaptiveScannerO8::AdaptiveScannerO8 ( } - AdaptiveScannerO8::AdaptiveScannerO8 ( int xmin, int ymin, int xmax, int ymax, int a, int b, diff --git a/Code/FBSD/DirectionalScanner/adaptivescannero8.h b/Code/FBSD/DirectionalScanner/adaptivescannero8.h index d66d7bfeb15e6ebaaa85b374cc1437cb6181f3ee..a4019e2d0e0d312fb7be14c18f1c071199313d8f 100755 --- a/Code/FBSD/DirectionalScanner/adaptivescannero8.h +++ b/Code/FBSD/DirectionalScanner/adaptivescannero8.h @@ -3,9 +3,6 @@ #include "directionalscanner.h" -using namespace std; - - /** * @class AdaptiveScannerO8 adaptivescannero8.h @@ -16,70 +13,61 @@ class AdaptiveScannerO8 : public DirectionalScanner public: /** - * @fn AdaptiveScanner08(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int mu2, - * int nbs, bool *steps, int sx, int sy) * \brief Creates an adaptive DS from pattern, start and upper bound. * The scan strip is composed of parallel scan lines, the first one being * defined by a start point, a line pattern, and an upper bound. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c y intercept parameter of the upper bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param sx abscissae of the central scan start point - * @param sy ordinate of the central scan start point + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c Value of parameter 'c' of the upper bounding line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param sx X-coordinate of the central scan start point. + * @param sy Y-coordinate of the central scan start point. */ AdaptiveScannerO8 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c, int nbs, bool *steps, int sx, int sy); /** - * @fn AdaptiveScanner08(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int c1, int c2, - * int nbs, bool *steps, int cx, int cy) * \brief Creates an adaptive DS from pattern, center and bounds. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, upper and lower bounds. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c1 y intercept parameter of one of the bounds - * @param c2 y intercept parameter of the other bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c1 Value of parameter 'c' of one of the support lines. + * @param c2 Value of parameter 'c' of the other support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. */ AdaptiveScannerO8 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, int nbs, bool *steps, int cx, int cy); /** - * @fn AdaptiveScanner08(int xmin, int ymin, int xmax, int ymax, - * int a, int b, - * int nbs, bool *steps, int cx, int cy, int length) * \brief Creates an adaptive DS from pattern, center and length. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, and a length value. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center - * @param length length of a scan strip + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. + * @param length Length of a scan strip. */ AdaptiveScannerO8 (int xmin, int ymin, int xmax, int ymax, int a, int b, @@ -87,59 +75,60 @@ public: int cx, int cy, int length); /** - * @fn DirectionalScanner *getCopy (); * \brief Returns a copy of the directional scanner. */ DirectionalScanner *getCopy (); /** - * @fn first(vector<Pt2i> &scan) * \brief Returns the central scan. - * Fills in the vector with the central scan and returns its size. - * @param scan vectors of points to be filled in. + * Adds central scan points to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int first (vector<Pt2i> &scan) const; /** - * @fn nextOnLeft(vector<Pt2i> &scan) * \brief Returns the next scan on the left. - * Fills in the vector with the next scan on left and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next left scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnLeft (vector<Pt2i> &scan); /** - * @fn nextOnRight(vector<Pt2i> &scan) * \brief Returns the next scan on the right. - * Fills in the vector with the next scan on right and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next right scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnRight (vector<Pt2i> &scan); /** - * @fn bindTo(int a, int b, int c) * \brief Binds the scan stripe to wrap the given digital line. - * Resets the bounding lines parameters to center on the given line. - * @param a New value for the 'a' parameter of the current scan stripe. - * @param b New value for the 'b' parameter of the current scan stripe. - * @param c New value for the medial axis of the current scan stripe. + * Resets bounding lines parameters to center the scan stripe on given line. + * @param a Parameter 'a' of given digital line. + * @param b Parameter 'b' of given digital line. + * @param c Parameter 'c' of given digital line. */ void bindTo (int a, int b, int c); protected : - AdaptiveScannerO8 () { } - - /** Coefficients of the template discrete support lines */ - int templ_a, templ_b, templ_nu; + /** Parameter 'a' of template support discrete line template. */ + int templ_a; + /** Parameter 'b' of template support discrete line template. */ + int templ_b; + /** Parameter 'nu' of template support discrete line template. */ + int templ_nu; - /** Shift coefficient of the discrete lower support line */ + /** Shift parameter of the discrete lower support line */ int dlc1; /** - * @fn AdaptiveScannerO8(AdaptiveScannerO8 *ds) + * \brief Creates an empty adaptive directional scanner. + */ + AdaptiveScannerO8 () { } + + /** * \brief Creates a copy of given directional scanner. * @param ds Source directional scanner. */ diff --git a/Code/FBSD/DirectionalScanner/directionalscanner.cpp b/Code/FBSD/DirectionalScanner/directionalscanner.cpp index eaf6668e6c4ac7b50a6876f7ce741e79949de103..a056e186b8d8e3e07efc854f371cb5f6969e521f 100755 --- a/Code/FBSD/DirectionalScanner/directionalscanner.cpp +++ b/Code/FBSD/DirectionalScanner/directionalscanner.cpp @@ -1,8 +1,6 @@ -#include <cstdlib> #include "directionalscanner.h" - DirectionalScanner::~DirectionalScanner () { if (steps != NULL) delete steps; diff --git a/Code/FBSD/DirectionalScanner/directionalscanner.h b/Code/FBSD/DirectionalScanner/directionalscanner.h index f212c0e4499ebdaea2ad7e812ea6da2336ccb794..6891bc8f4bd718ad5f763e025845c4d9c1b64977 100755 --- a/Code/FBSD/DirectionalScanner/directionalscanner.h +++ b/Code/FBSD/DirectionalScanner/directionalscanner.h @@ -1,13 +1,9 @@ #ifndef DIRECTIONAL_SCANNER_H #define DIRECTIONAL_SCANNER_H -#include <cstdlib> #include <vector> #include "pt2i.h" -using namespace std; - - /** * @class DirectionalScanner directionalscanner.h @@ -19,53 +15,46 @@ class DirectionalScanner public: /** - * @fn ~DirectionalScan() * \brief Deletes the scan strip. */ virtual ~DirectionalScanner (); /** - * @fn virtual DirectionalScanner *getCopy () = 0; * \brief Returns a copy of the directional scanner. */ virtual DirectionalScanner *getCopy () = 0; /** - * @fn first(vector<Pt2i> &scan) const * \brief Returns the central scan. - * Fills in the vector with the central scan and returns its size. - * @param scan vectors of points to be filled in. + * Adds central scan points to given vector and returns its new size. + * @param scan Vector of points to be completed. */ virtual int first (vector<Pt2i> &scan) const = 0; /** - * @fn nextOnLeft(vector<Pt2i> &scan) - * \brief Returns the next scan on the left. - * Fills in the vector with the next scan on left and returns its size. - * @param scan vectors of points to be filled in. + * \brief Returns next scan on the left. + * Adds points of next left scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ virtual int nextOnLeft (vector<Pt2i> &scan) = 0; /** - * @fn nextOnRight(vector<Pt2i> &scan) - * \brief Returns the next scan on the right. - * Fills in the vector with the next scan on right and returns its size. - * @param scan vectors of points to be filled in. + * \brief Returns next scan on the right. + * Adds points of next right scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ virtual int nextOnRight (vector<Pt2i> &scan) = 0; /** - * @fn bindTo(int a, int b, int c) * \brief Binds the scan stripe to wrap the given digital line. - * Resets the bounding lines parameters to center on the given line. - * @param a New value for the 'a' parameter of the current scan stripe. - * @param b New value for the 'b' parameter of the current scan stripe. - * @param c New value for the medial axis of the current scan stripe. + * Resets bounding lines parameters to center the scan stripe on given line. + * @param a New value for the 'a' parameter of current scan stripe. + * @param b New value for the 'b' parameter of current scan stripe. + * @param c New value for the 'c' parameter of current scan stripe. */ virtual void bindTo (int a, int b, int c); /** - * @fn Pt2i locate (const Pt2i &pt) const * \brief Returns the scanner coordinates of given point. * Scanner coordinates are the stripe index and the position in the stripe. * @param pt Image coordinates of the point. @@ -73,54 +62,78 @@ public: virtual Pt2i locate (const Pt2i &pt) const; /** - * @fn void releaseClearance () - * \brief Releases output vector clearance before filling. + * \brief Releases clearance status of output vector before filling. */ inline void releaseClearance () { clearance = false; } protected: - /** Scanable area. */ - int xmin, ymin, xmax, ymax; - - /** Coefficients of the discrete upper support line. */ - int dla, dlb, dlc2; + /** Scanable area left border. */ + int xmin; + /** Scanable area bottom border. */ + int ymin; + /** Scanable area right border. */ + int xmax; + /** Scanable area top border. */ + int ymax; + + /** Parameter 'a' of the upper support discrete line. */ + int dla; + /** Parameter 'b' of the upper support discrete line. */ + int dlb; + /** Parameter 'c' of the upper support discrete line. */ + int dlc2; /** Size of the discrete line pattern. */ int nbs; - /** Discrete line pattern and its end. */ - bool *steps, *fs; - - /** Start position of a scan for both directions. */ - int ccx, ccy, lcx, lcy, rcx, rcy; - - /** Current step in scan direction. */ - bool *lst2, *rst2; + /** Discrete line pattern. */ + bool *steps; + /** Pointer to the end of discrete line pattern. */ + bool *fs; + + /** X-start position of central scan. */ + int ccx; + /** Y-start position of central scan. */ + int ccy; + /** X-start position of last scan to the left. */ + int lcx; + /** Y-start position of last scan to the left. */ + int lcy; + /** X-start position of last scan to the right. */ + int rcx; + /** Y-start position of last scan to the right. */ + int rcy; + + /** Current pattern step in left scan direction. */ + bool *lst2; + /** Current pattern step in right scan direction. */ + bool *rst2; /** Flag indicating if the output vector should be cleared before filling. Set to true by default. */ bool clearance; + /** + * \brief Creates an empty directional scanner. + */ DirectionalScanner () { } /** - * @fn DirectionalScanner(int xmini, int ymini, int xmaxi, int ymaxi, - * int nb, bool* st, int sx, int sy) * \brief Creates an incremental directional scanner. * Creates a directional scanner from pattern and start. * The scan strip is composed of parallel scan lines, the first one being * defined by a start point and a line pattern. - * @param xmini left border of the scan area - * @param ymini low border of the scan area - * @param xmaxi right border of the scan area - * @param ymaxi up border of the scan area - * @param nb size of the support line pattern - * @param st support line pattern - * @param sx abscissae of the central scan start point - * @param sy ordinate of the central scan start point + * @param xmini Left border of the scan area. + * @param ymini Bottom border of the scan area. + * @param xmaxi Right border of the scan area. + * @param ymaxi Top border of the scan area. + * @param nb Size of the support line pattern. + * @param st Support line pattern + * @param sx X-coordinate of the central scan start point + * @param sy Y-coordinate of the central scan start point */ DirectionalScanner (int xmini, int ymini, int xmaxi, int ymaxi, int nb, bool* st, int sx, int sy) @@ -130,7 +143,6 @@ protected: clearance (true) { } /** - * @fn DirectionalScanner(DirectionalScanner *ds) * \brief Creates a copy of given directional scanner. * @param ds Source directional scanner. */ diff --git a/Code/FBSD/DirectionalScanner/directionalscannero1.cpp b/Code/FBSD/DirectionalScanner/directionalscannero1.cpp index 1d3d3c32fe8966f9b5ae490dd35d437a844e9091..557b4152503bf8f2ba1a8fba97cba9a921f894e2 100755 --- a/Code/FBSD/DirectionalScanner/directionalscannero1.cpp +++ b/Code/FBSD/DirectionalScanner/directionalscannero1.cpp @@ -1,8 +1,6 @@ -#include <cstdlib> #include "directionalscannero1.h" - DirectionalScannerO1::DirectionalScannerO1 ( int xmin, int ymin, int xmax, int ymax, int a, int b, int c, @@ -24,7 +22,6 @@ DirectionalScannerO1::DirectionalScannerO1 ( } - DirectionalScannerO1::DirectionalScannerO1 ( int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, @@ -67,7 +64,6 @@ ccy = lcy; } - DirectionalScannerO1::DirectionalScannerO1 ( int xmin, int ymin, int xmax, int ymax, int a, int b, diff --git a/Code/FBSD/DirectionalScanner/directionalscannero1.h b/Code/FBSD/DirectionalScanner/directionalscannero1.h index 73129956c34fd34c1f7f3f0ff906069b8b47af5b..64ec2061867a42b7cdda9f0b2b90ab12e1eb7131 100755 --- a/Code/FBSD/DirectionalScanner/directionalscannero1.h +++ b/Code/FBSD/DirectionalScanner/directionalscannero1.h @@ -3,9 +3,6 @@ #include "directionalscanner.h" -using namespace std; - - /** * @class DirectionalScannerO1 directionalscannero1.h @@ -16,70 +13,61 @@ class DirectionalScannerO1 : public DirectionalScanner public: /** - * @fn DirectionalScanner01(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int mu2, - * int nbs, bool *steps, int sx, int sy) * \brief Creates a directional scanner from pattern, start and upper bound. * The scan strip is composed of parallel scan lines, the first one being * defined by a start point, a line pattern, and an upper bound. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c y intercept parameter of the upper bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param sx abscissae of the central scan start point - * @param sy ordinate of the central scan start point + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c Value of parameter 'c' of the upper bounding line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param sx X-coordinate of the central scan start point. + * @param sy Y-coordinate of the central scan start point. */ DirectionalScannerO1 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c, int nbs, bool *steps, int sx, int sy); /** - * @fn DirectionalScanner01(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int c1, int c2, - * int nbs, bool *steps, int cx, int cy) * \brief Creates a directional scanner from pattern, center and bounds. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, upper and lower bounds. - * @param xmin left border of the scan area - * @param xmax right border of the scan area - * @param ymin low border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c1 y intercept parameter of one of the bounds - * @param c2 y intercept parameter of the other bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c1 Value of parameter 'c' of one of the support lines. + * @param c2 Value of parameter 'c' of the other support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. */ DirectionalScannerO1 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, int nbs, bool *steps, int cx, int cy); /** - * @fn DirectionalScanner01(int xmin, int ymin, int xmax, int ymax, - * int a, int b, - * int nbs, bool *steps, int cx, int cy, int length) * \brief Creates a directional scanner from pattern, center and length. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, and a length value. - * @param xmin left border of the scan area - * @param xmax right border of the scan area - * @param ymin low border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center - * @param length length of a scan strip + * @param xmin Left border of the scan area. + * @param xmax Right border of the scan area. + * @param ymin Bottom border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. + * @param length Length of a scan strip. */ DirectionalScannerO1 (int xmin, int ymin, int xmax, int ymax, int a, int b, @@ -87,38 +75,33 @@ public: int cx, int cy, int length); /** - * @fn DirectionalScanner *getCopy (); * \brief Returns a copy of the directional scanner. */ DirectionalScanner *getCopy (); /** - * @fn first(vector<Pt2i> &scan) * \brief Returns the central scan. - * Fills in the vector with the central scan and returns its size. - * @param scan vectors of points to be filled in. + * Adds central scan points to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int first (vector<Pt2i> &scan) const; /** - * @fn nextOnLeft(vector<Pt2i> &scan) * \brief Returns the next scan on the left. - * Fills in the vector with the next scan on left and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next left scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnLeft (vector<Pt2i> &scan); /** - * @fn nextOnRight(vector<Pt2i> &scan) * \brief Returns the next scan on the right. - * Fills in the vector with the next scan on right and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next right scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnRight (vector<Pt2i> &scan); /** - * @fn Pt2i locate (const Pt2i &pt) const - * \brief Returns the scanner coordinates of the givent point. + * \brief Returns the scanner coordinates of given point. * Scanner coordinates are the stripe index and the position in the stripe. * @param pt Image coordinates of the point. */ @@ -127,15 +110,18 @@ public: private: - /** Current step in strip direction */ - bool *lst1, *rst1; + /** Current pattern step in strip direction on left side. */ + bool *lst1; + /** Current pattern step in strip direction on right side. */ + bool *rst1; - /** State of the scan */ - bool ltransition, rtransition; + /** Status indicating start with a transition on last left scan. */ + bool ltransition; + /** Status indicating start with a transition on last right scan. */ + bool rtransition; /** - * @fn DirectionalScannerO1(DirectionalScannerO1 *ds) * \brief Creates a copy of given directional scanner. * @param ds Source directional scanner. */ diff --git a/Code/FBSD/DirectionalScanner/directionalscannero2.cpp b/Code/FBSD/DirectionalScanner/directionalscannero2.cpp index d5277a755f77ef10ffd438eb7f8346d5dd9f73ed..ad3ffedd1b3a232b4c43c8f00d0bd6814add3289 100755 --- a/Code/FBSD/DirectionalScanner/directionalscannero2.cpp +++ b/Code/FBSD/DirectionalScanner/directionalscannero2.cpp @@ -1,8 +1,6 @@ -#include <cstdlib> #include "directionalscannero2.h" - DirectionalScannerO2::DirectionalScannerO2 ( int xmin, int ymin, int xmax, int ymax, int a, int b, int c, @@ -24,7 +22,6 @@ DirectionalScannerO2::DirectionalScannerO2 ( } - DirectionalScannerO2::DirectionalScannerO2 ( int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, @@ -67,7 +64,6 @@ ccy = lcy; } - DirectionalScannerO2::DirectionalScannerO2 ( int xmin, int ymin, int xmax, int ymax, int a, int b, diff --git a/Code/FBSD/DirectionalScanner/directionalscannero2.h b/Code/FBSD/DirectionalScanner/directionalscannero2.h index 67c8e4142ec61dab8cbff914398dc3a741340992..665fecaa21a0396cef523bfdd9fcdc8f52023ea6 100755 --- a/Code/FBSD/DirectionalScanner/directionalscannero2.h +++ b/Code/FBSD/DirectionalScanner/directionalscannero2.h @@ -3,9 +3,6 @@ #include "directionalscanner.h" -using namespace std; - - /** * @class DirectionalScannerO2 directionalscannero2.h @@ -16,70 +13,61 @@ class DirectionalScannerO2 : public DirectionalScanner public: /** - * @fn DirectionalScanner02(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int mu2, - * int nbs, bool *steps, int sx, int sy) * \brief Creates a directional scanner from pattern, start and upper bound. * The scan strip is composed of parallel scan lines, the first one being * defined by a start point, a line pattern, and an upper bound. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c y intercept parameter of the upper bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param sx abscissae of the central scan start point - * @param sy ordinate of the central scan start point + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'b' 'a' of the discrete support line. + * @param b Value of parameter 'b' 'b' of the discrete support line. + * @param c Value of parameter 'b' 'c' of the upper bounding line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param sx X-coordinate of the central scan start point. + * @param sy Y-coordinate of the central scan start point. */ DirectionalScannerO2 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c, int nbs, bool *steps, int sx, int sy); /** - * @fn DirectionalScanner02(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int c1, int c2, - * int nbs, bool *steps, int cx, int cy) * \brief Creates a directional scanner from pattern, center and bounds. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, upper and lower bounds. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c1 y intercept parameter of one of the bounds - * @param c2 y intercept parameter of the other bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c1 Value of parameter 'c' of one of the support lines. + * @param c2 Valur of parameter 'c' of the other support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. */ DirectionalScannerO2 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, int nbs, bool *steps, int cx, int cy); /** - * @fn DirectionalScanner02(int xmin, int ymin, int xmax, int ymax, - * int a, int b, - * int nbs, bool *steps, int cx, int cy, int length) * \brief Creates a directional scanner from pattern, center and length. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, and a length value. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center - * @param length length of a scan strip + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'a' of the discrete support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. + * @param length Length of a scan strip. */ DirectionalScannerO2 (int xmin, int ymin, int xmax, int ymax, int a, int b, @@ -87,38 +75,33 @@ public: int cx, int cy, int length); /** - * @fn DirectionalScanner *getCopy (); * \brief Returns a copy of the directional scanner. */ DirectionalScanner *getCopy (); /** - * @fn first(vector<Pt2i> &scan) * \brief Returns the central scan. - * Fills in the vector with the central scan and returns its size. - * @param scan vectors of points to be filled in. + * Adds central scan points to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int first (vector<Pt2i> &scan) const; /** - * @fn nextOnLeft(vector<Pt2i> &scan) * \brief Returns the next scan on the left. - * Fills in the vector with the next scan on left and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next left scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnLeft (vector<Pt2i> &scan); /** - * @fn nextOnRight(vector<Pt2i> &scan) * \brief Returns the next scan on the right. - * Fills in the vector with the next scan on right and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next right scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnRight (vector<Pt2i> &scan); /** - * @fn Pt2i locate (const Pt2i &pt) const - * \brief Returns the scanner coordinates of the givent point. + * \brief Returns the scanner coordinates of given point. * Scanner coordinates are the stripe index and the position in the stripe. * @param pt Image coordinates of the point. */ @@ -127,15 +110,18 @@ public: private: - /** Current step in strip direction */ - bool *lst1, *rst1; + /** Current pattern step in strip direction on left side. */ + bool *lst1; + /** Current pattern step in strip direction on right side. */ + bool *rst1; - /** State of the scan */ - bool ltransition, rtransition; + /** Status indicating start with a transition on last left scan. */ + bool ltransition; + /** Status indicating start with a transition on last right scan. */ + bool rtransition; /** - * @fn DirectionalScannerO2(DirectionalScannerO2 *ds) * \brief Creates a copy of given directional scanner. * @param ds Source directional scanner. */ diff --git a/Code/FBSD/DirectionalScanner/directionalscannero7.cpp b/Code/FBSD/DirectionalScanner/directionalscannero7.cpp index d0e0ea529b2c6a64501cc794fef9997018f290ef..3e73523ec13b2ed3b1c09878dbfaed0bd71cca14 100755 --- a/Code/FBSD/DirectionalScanner/directionalscannero7.cpp +++ b/Code/FBSD/DirectionalScanner/directionalscannero7.cpp @@ -1,8 +1,6 @@ -#include <cstdlib> #include "directionalscannero7.h" - DirectionalScannerO7::DirectionalScannerO7 ( int xmin, int ymin, int xmax, int ymax, int a, int b, int c, @@ -24,7 +22,6 @@ DirectionalScannerO7::DirectionalScannerO7 ( } - DirectionalScannerO7::DirectionalScannerO7 ( int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, @@ -67,7 +64,6 @@ ccy = lcy; } - DirectionalScannerO7::DirectionalScannerO7 ( int xmin, int ymin, int xmax, int ymax, int a, int b, diff --git a/Code/FBSD/DirectionalScanner/directionalscannero7.h b/Code/FBSD/DirectionalScanner/directionalscannero7.h index fa7dcc8465a463b11d5bf51bce72383272259374..92562c3e4b66682682f91dea2996f2a76e0df88b 100755 --- a/Code/FBSD/DirectionalScanner/directionalscannero7.h +++ b/Code/FBSD/DirectionalScanner/directionalscannero7.h @@ -3,9 +3,6 @@ #include "directionalscanner.h" -using namespace std; - - /** * @class DirectionalScannerO7 directionalscannero7.h @@ -16,70 +13,61 @@ class DirectionalScannerO7 : public DirectionalScanner public: /** - * @fn DirectionalScannerO7(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int mu2, - * int nbs, bool *steps, int sx, int sy) * \brief Creates a directional scanner from pattern, start and upper bound. * The scan strip is composed of parallel scan lines, the first one being * defined by a start point, a line pattern, and an upper bound. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c y intercept parameter of the upper bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param sx abscissae of the central scan start point - * @param sy ordinate of the central scan start point + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c Value of parameter 'c' of the upper bounding line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param sx X-coordinate of the central scan start point. + * @param sy Y-coordinate of the central scan start point. */ DirectionalScannerO7 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c, int nbs, bool *steps, int sx, int sy); /** - * @fn DirectionalScanner07(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int c1, int c2, - * int nbs, bool *steps, int cx, int cy) * \brief Creates a directional scanner from pattern, center and bounds. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, upper and lower bounds. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c1 y intercept parameter of one of the bounds - * @param c2 y intercept parameter of the other bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c1 Value of parameter 'c' of one of the support lines. + * @param c2 Value of parameter 'c' of the other support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. */ DirectionalScannerO7 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, int nbs, bool *steps, int cx, int cy); /** - * @fn DirectionalScanner07(int xmin, int ymin, int xmax, int ymax, - * int a, int b, - * int nbs, bool *steps, int cx, int cy, int length) * \brief Creates a directional scanner from pattern, center and length. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, and a length. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center - * @param length length of a scan strip + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. + * @param length Length of a scan strip. */ DirectionalScannerO7 (int xmin, int ymin, int xmax, int ymax, int a, int b, @@ -87,38 +75,33 @@ public: int cx, int cy, int length); /** - * @fn DirectionalScanner *getCopy (); * \brief Returns a copy of the directional scanner. */ DirectionalScanner *getCopy (); /** - * @fn first(vector<Pt2i> &scan) * \brief Returns the central scan. - * Fills in the vector with the central scan and returns its size. - * @param scan vectors of points to be filled in. + * Adds central scan points to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int first (vector<Pt2i> &scan) const; /** - * @fn nextOnLeft(vector<Pt2i> &scan) * \brief Returns the next scan on the left. - * Fills in the vector with the next scan on left and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next left scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnLeft (vector<Pt2i> &scan); /** - * @fn nextOnRight(vector<Pt2i> &scan) * \brief Returns the next scan on the right. - * Fills in the vector with the next scan on right and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next right scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnRight (vector<Pt2i> &scan); /** - * @fn Pt2i locate (const Pt2i &pt) const - * \brief Returns the scanner coordinates of the givent point. + * \brief Returns the scanner coordinates of given point. * Scanner coordinates are the stripe index and the position in the stripe. * @param pt Image coordinates of the point. */ @@ -127,15 +110,18 @@ public: private: - /** Current step in strip direction */ - bool *lst1, *rst1; + /** Current pattern step in strip direction on left side. */ + bool *lst1; + /** Current pattern step in strip direction on right side. */ + bool *rst1; - /** State of the scan */ - bool ltransition, rtransition; + /** Status indicating start with a transition on last left scan. */ + bool ltransition; + /** Status indicating start with a transition on last right scan. */ + bool rtransition; /** - * @fn DirectionalScannerO7(DirectionalScannerO7 *ds) * \brief Creates a copy of given directional scanner. * @param ds Source directional scanner. */ diff --git a/Code/FBSD/DirectionalScanner/directionalscannero8.cpp b/Code/FBSD/DirectionalScanner/directionalscannero8.cpp index 311456f43fdbedacc3bd3813ac648d23dcb5a802..0c79d635bc0c35af4c9d8264db92ba639fa00bb2 100755 --- a/Code/FBSD/DirectionalScanner/directionalscannero8.cpp +++ b/Code/FBSD/DirectionalScanner/directionalscannero8.cpp @@ -1,8 +1,6 @@ -#include <cstdlib> #include "directionalscannero8.h" - DirectionalScannerO8::DirectionalScannerO8 ( int xmin, int ymin, int xmax, int ymax, int a, int b, int c, @@ -24,7 +22,6 @@ DirectionalScannerO8::DirectionalScannerO8 ( } - DirectionalScannerO8::DirectionalScannerO8 ( int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, @@ -67,7 +64,6 @@ ccy = lcy; } - DirectionalScannerO8::DirectionalScannerO8 ( int xmin, int ymin, int xmax, int ymax, int a, int b, diff --git a/Code/FBSD/DirectionalScanner/directionalscannero8.h b/Code/FBSD/DirectionalScanner/directionalscannero8.h index b753ce7a1fb7a0834882f0336e96a5f5431e049b..099954b1f14347a69a52fe4804c91c5dc05cd91e 100755 --- a/Code/FBSD/DirectionalScanner/directionalscannero8.h +++ b/Code/FBSD/DirectionalScanner/directionalscannero8.h @@ -3,9 +3,6 @@ #include "directionalscanner.h" -using namespace std; - - /** * @class DirectionalScannerO8 directionalscannero8.h @@ -16,70 +13,61 @@ class DirectionalScannerO8 : public DirectionalScanner public: /** - * @fn DirectionalScanner08(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int mu2, - * int nbs, bool *steps, int sx, int sy) * \brief Creates a directional scanner from pattern, start and upper bound. * The scan strip is composed of parallel scan lines, the first one being * defined by a start point, a line pattern, and an upper bound. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c y intercept parameter of the upper bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param sx abscissae of the central scan start point - * @param sy ordinate of the central scan start point + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c Value of parameter 'c' of the upper bounding line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param sx X-coordinate of the central scan start point. + * @param sy Y-coordinate of the central scan start point. */ DirectionalScannerO8 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c, int nbs, bool *steps, int sx, int sy); /** - * @fn DirectionalScanner08(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int c1, int c2, - * int nbs, bool *steps, int cx, int cy) * \brief Creates a directional scanner from pattern, center and bounds. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, upper and lower bounds. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c1 y intercept parameter of one of the bounds - * @param c2 y intercept parameter of the other bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c1 Value of parameter 'c' of one of the support lines. + * @param c2 Value of parameter 'c' of the other support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. */ DirectionalScannerO8 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, int nbs, bool *steps, int cx, int cy); /** - * @fn DirectionalScanner08(int xmin, int ymin, int xmax, int ymax, - * int a, int b, - * int nbs, bool *steps, int cx, int cy, int length) * \brief Creates a directional scanner from pattern, center and length. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, and a length value. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center - * @param length length of a scan strip + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. + * @param length Length of a scan strip. */ DirectionalScannerO8 (int xmin, int ymin, int xmax, int ymax, int a, int b, @@ -87,38 +75,33 @@ public: int cx, int cy, int length); /** - * @fn DirectionalScanner *getCopy (); * \brief Returns a copy of the directional scanner. */ DirectionalScanner *getCopy (); /** - * @fn first(vector<Pt2i> &scan) * \brief Returns the central scan. - * Fills in the vector with the central scan and returns its size. - * @param scan vectors of points to be filled in. + * Adds central scan points to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int first (vector<Pt2i> &scan) const; /** - * @fn nextOnLeft(vector<Pt2i> &scan) * \brief Returns the next scan on the left. - * Fills in the vector with the next scan on left and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next left scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnLeft (vector<Pt2i> &scan); /** - * @fn nextOnRight(vector<Pt2i> &scan) * \brief Returns the next scan on the right. - * Fills in the vector with the next scan on right and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next right scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnRight (vector<Pt2i> &scan); /** - * @fn Pt2i locate (const Pt2i &pt) const - * \brief Returns the scanner coordinates of the givent point. + * \brief Returns the scanner coordinates of given point. * Scanner coordinates are the stripe index and the position in the stripe. * @param pt Image coordinates of the point. */ @@ -127,15 +110,18 @@ public: private: - /** Current step in strip direction */ - bool *lst1, *rst1; + /** Current pattern step in strip direction on left side. */ + bool *lst1; + /** Current pattern step in strip direction on right side. */ + bool *rst1; - /** State of the scan */ - bool ltransition, rtransition; + /** Status indicating start with a transition on last left scan. */ + bool ltransition; + /** Status indicating start with a transition on last right scan. */ + bool rtransition; /** - * @fn DirectionalScannerO8(DirectionalScannerO8 *ds) * \brief Creates a copy of given directional scanner. * @param ds Source directional scanner. */ diff --git a/Code/FBSD/DirectionalScanner/scannerprovider.cpp b/Code/FBSD/DirectionalScanner/scannerprovider.cpp index b33cdf02b1b68def614206b303884b15febb2c62..0d23234f2d814decb6909673089aebbec7de5f40 100755 --- a/Code/FBSD/DirectionalScanner/scannerprovider.cpp +++ b/Code/FBSD/DirectionalScanner/scannerprovider.cpp @@ -1,5 +1,3 @@ -// #include <cstdlib> -// #include <iostream> #include "scannerprovider.h" #include "directionalscannero2.h" #include "directionalscannero7.h" @@ -11,7 +9,6 @@ #include "vhscannero8.h" - DirectionalScanner *ScannerProvider::getScanner (Pt2i p1, Pt2i p2, bool controlable) { @@ -114,7 +111,6 @@ DirectionalScanner *ScannerProvider::getScanner (Pt2i p1, Pt2i p2, } - DirectionalScanner *ScannerProvider::getScanner (Pt2i p1, Pt2i p2, Pt2i v1, Pt2i v2) { diff --git a/Code/FBSD/DirectionalScanner/scannerprovider.h b/Code/FBSD/DirectionalScanner/scannerprovider.h index 47c227b2dd37943ed50b8f231a9e67f1aa1d0283..f1f669e988a1de1096e67022394dda036785dbb7 100755 --- a/Code/FBSD/DirectionalScanner/scannerprovider.h +++ b/Code/FBSD/DirectionalScanner/scannerprovider.h @@ -1,7 +1,7 @@ #ifndef SCANNER_PROVIDER_H #define SCANNER_PROVIDER_H -#include <cstdlib> +//#include <cstdlib> #include "directionalscanner.h" using namespace std; @@ -19,14 +19,12 @@ class ScannerProvider public: /** - * @fn ScannerProvider() * \brief Builds a directional scanner provider. */ ScannerProvider () : isOrtho (false), lastScanReversed (false), xmin (0), ymin (0), xmax (100), ymax (100) { } /** - * @fn void setSize (int sizex, int sizey) * \brief Sets the scanned area size. * @param sizex Scan area width. * @param sizey Scan area height. @@ -35,7 +33,6 @@ public: xmax = xmin + sizex; ymax = ymin + sizey; } /** - * @fn void setArea (int x0, int y0, int sizex, in sizey) * \brief Sets the scanned area size. * @param x0 Left column coordinate of the scan area. * @param y0 Lower line coordinate of the scan area. @@ -46,67 +43,60 @@ public: xmin = x0, ymin = y0, xmax = x0 + sizex; ymax = y0 + sizey; } /** - * @fn getScanner(Pt2i p1, Pt2i p2) * \brief Returns an incremental directional scanner. * Returns a directional scanner from two control points. * The scan strip is composed of parallel scan lines, the first one being * defined by control points p1 and p2. * @param p1 Start control point. * @param p2 End control point. - * @param controlable controlability request (true for a dynamical scanner). + * @param controlable Controlability request (true for an adaptive scanner). */ DirectionalScanner *getScanner (Pt2i p1, Pt2i p2, bool controlable = false); /** - * @fn getScanner(Pt2i p1, Pt2i p2, Pt2i v1, Pt2i v2) * \brief Returns an incremental directional scanner. * Returns a directional scanner from two points and direction v1 -> v2. * The scan strip is composed of parallel scan lines, centered on the middle * of (p1,p2) and aligned on (v1,v2). - * @param p1 start control point - * @param p2 end control point - * @param v1 direction start point - * @param v2 direction end point + * @param p1 Start control point + * @param p2 End control point + * @param v1 Direction start point + * @param v2 Direction end point */ DirectionalScanner *getScanner (Pt2i p1, Pt2i p2, Pt2i v1, Pt2i v2); /** - * @fn getScanner(Pt2i centre, Vr2i normal, int length) * \brief Returns an incremental directional scanner. * Returns a directional scanner from two points and direction v1 -> v2. * The scan strip is composed of parallel scan lines, centered on the middle * of (p1,p2) and aligned on (v1,v2). - * @param centre central point - * @param normal scan strip normal vector - * @param length length of a scan line + * @param centre Central point + * @param normal Scan strip normal vector + * @param length Length of a scan line */ DirectionalScanner *getScanner (Pt2i centre, Vr2i normal, int length); /** - * @fn getScanner(Pt2i centre, Vr2i normal, int length, bool controlable, - * int xmin, int ymin, nt xmax, int ymax) * \brief Returns an incremental directional scanner. * Returns a directional scanner from two points and direction v1 -> v2. * The scan strip is composed of parallel scan lines, centered on the middle * of (p1,p2) and aligned on (v1,v2). - * @param centre central point - * @param normal scan strip normal vector - * @param length length of a scan line - * @param controlable controlability request (true for a dynamical scanner) + * @param centre Central point + * @param normal Scan strip normal vector + * @param length Length of a scan line + * @param controlable Controlability request (true for an adaptive scanner) */ DirectionalScanner *getScanner (Pt2i centre, Vr2i normal, int length, bool controlable); /** - * @fn bool isLastScanReversed () const * \brief Returns whether the currently used scan end points were permutated. */ inline bool isLastScanReversed () const { return lastScanReversed; } /** - * @fn setOrtho(bool status) * \brief Sets the orthogonal scanner modality. - * @param status new status for the orthogonal scanner modality. + * @param status New status for the orthogonal scanner modality. */ inline void setOrtho (bool status) { isOrtho = status; } diff --git a/Code/FBSD/DirectionalScanner/vhscannero1.cpp b/Code/FBSD/DirectionalScanner/vhscannero1.cpp index bf29f152904bcba3ced8644c87a8c29e5148e665..d19ee126aa1904620d51ac9c2e71108909aaa03a 100755 --- a/Code/FBSD/DirectionalScanner/vhscannero1.cpp +++ b/Code/FBSD/DirectionalScanner/vhscannero1.cpp @@ -1,8 +1,6 @@ -#include <cstdlib> #include "vhscannero1.h" - VHScannerO1::VHScannerO1 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c, int nbs, bool *steps, int sx, int sy) @@ -12,7 +10,6 @@ VHScannerO1::VHScannerO1 (int xmin, int ymin, int xmax, int ymax, } - VHScannerO1::VHScannerO1 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, int nbs, bool *steps, int cx, int cy) @@ -60,7 +57,6 @@ VHScannerO1::VHScannerO1 (int xmin, int ymin, int xmax, int ymax, } - VHScannerO1::VHScannerO1 (int xmin, int ymin, int xmax, int ymax, int a, int b, int nbs, bool *steps, int cx, int cy, int length) diff --git a/Code/FBSD/DirectionalScanner/vhscannero1.h b/Code/FBSD/DirectionalScanner/vhscannero1.h index 6c2b4fbf0302a4b23b120f5b1b98b5937aa52359..1e20b1dd27131fa39058641b336b876bd1af4671 100755 --- a/Code/FBSD/DirectionalScanner/vhscannero1.h +++ b/Code/FBSD/DirectionalScanner/vhscannero1.h @@ -3,9 +3,6 @@ #include "adaptivescannero1.h" -using namespace std; - - /** * @class VHScannerO1 vhscannero1.h @@ -16,102 +13,89 @@ class VHScannerO1 : public AdaptiveScannerO1 public: /** - * @fn VHScanner01(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int c, - * int nbs, bool *steps, int sx, int sy) * \brief Creates a vh scanner from pattern, start and upper bound. * The scan strip is composed of parallel scan lines, the first one being * defined by a start point, a line pattern, and an upper bound. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c y intercept parameter of the upper bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param sx abscissae of the central scan start point - * @param sy ordinate of the central scan start point + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c Value of parameter 'c' of the upper bounding line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param sx X-coordinate of the central scan start point. + * @param sy Y-coordinate of the central scan start point. */ VHScannerO1 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c, int nbs, bool *steps, int sx, int sy); /** - * @fn VHScanner01(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int c1, int c2, - * int nbs, bool *steps, int cx, int cy) * \brief Creates a vh scanner from pattern, center and bounds. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, upper and lower bounds. - * @param xmin left border of the scan area - * @param xmax right border of the scan area - * @param ymin low border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c1 y intercept parameter of one of the bounds - * @param c2 y intercept parameter of the other bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c1 Value of parameter 'c' of one of the support lines. + * @param c2 Value of parameter 'c' of the other support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. */ VHScannerO1 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, int nbs, bool *steps, int cx, int cy); /** - * @fn VHScanner01(int xmin, int ymin, int xmax, int ymax, - * int a, int b, *int nbs, bool *steps, - * int cx, int cy, int length) * \brief Creates a vh scanner from pattern, center and length . * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, and a length value. - * @param xmin left border of the scan area - * @param xmax right border of the scan area - * @param ymin low border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center - * @param length length of a scan strip + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. + * @param length Length of a scan strip. */ VHScannerO1 (int xmin, int ymin, int xmax, int ymax, int a, int b, int nbs, bool *steps, int cx, int cy, int length); /** - * @fn DirectionalScanner *getCopy (); * \brief Returns a copy of the directional scanner. */ DirectionalScanner *getCopy (); /** - * @fn first(vector<Pt2i> &scan) * \brief Returns the central scan. - * Fills in the vector with the central scan and returns its size. - * @param scan vectors of points to be filled in. + * Adds central scan points to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int first (vector<Pt2i> &scan) const; /** - * @fn nextOnLeft(vector<Pt2i> &scan) * \brief Returns the next scan on the left. - * Fills in the vector with the next scan on left and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next left scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnLeft (vector<Pt2i> &scan); /** - * @fn nextOnRight(vector<Pt2i> &scan) * \brief Returns the next scan on the right. - * Fills in the vector with the next scan on right and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next right scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnRight (vector<Pt2i> &scan); @@ -119,7 +103,6 @@ public: private: /** - * @fn VHScannerO1(VHScannerO1 *ds) * \brief Creates a copy of given directional scanner. * @param ds Source directional scanner. */ diff --git a/Code/FBSD/DirectionalScanner/vhscannero2.cpp b/Code/FBSD/DirectionalScanner/vhscannero2.cpp index fa518b2d6b4baa59f6486d0af29dcb9fabe29a78..2622a5d0941c1249a015d5f8f8bbce6a389e760d 100755 --- a/Code/FBSD/DirectionalScanner/vhscannero2.cpp +++ b/Code/FBSD/DirectionalScanner/vhscannero2.cpp @@ -1,8 +1,6 @@ -#include <cstdlib> #include "vhscannero2.h" - VHScannerO2::VHScannerO2 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c, int nbs, bool *steps, int sx, int sy) @@ -12,7 +10,6 @@ VHScannerO2::VHScannerO2 (int xmin, int ymin, int xmax, int ymax, } - VHScannerO2::VHScannerO2 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, int nbs, bool *steps, int cx, int cy) @@ -60,7 +57,6 @@ VHScannerO2::VHScannerO2 (int xmin, int ymin, int xmax, int ymax, } - VHScannerO2::VHScannerO2 (int xmin, int ymin, int xmax, int ymax, int a, int b, int nbs, bool *steps, int cx, int cy, int length) diff --git a/Code/FBSD/DirectionalScanner/vhscannero2.h b/Code/FBSD/DirectionalScanner/vhscannero2.h index ef21ca457cebbac162352e3b7c654b8dccbd27ef..3c26e73d4d79c70d4536370b9a3e5b06485405a4 100755 --- a/Code/FBSD/DirectionalScanner/vhscannero2.h +++ b/Code/FBSD/DirectionalScanner/vhscannero2.h @@ -3,9 +3,6 @@ #include "adaptivescannero2.h" -using namespace std; - - /** * @class VHScannerO2 vhscannero2.h @@ -16,102 +13,89 @@ class VHScannerO2 : public AdaptiveScannerO2 public: /** - * @fn VHScanner02(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int c, - * int nbs, bool *steps, int sx, int sy) * \brief Creates a vh scanner from pattern, start and upper bound. * The scan strip is composed of parallel scan lines, the first one being * defined by a start point, a line pattern, and an upper bound. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c y intercept parameter of the upper bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param sx abscissae of the central scan start point - * @param sy ordinate of the central scan start point + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c Value of parameter 'c' of the upper bounding line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param sx X-coordinate of the central scan start point. + * @param sy Y-coordinate of the central scan start point. */ VHScannerO2 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c, int nbs, bool *steps, int sx, int sy); /** - * @fn VHScanner02(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int c1, int c2, - * int nbs, bool *steps, int cx, int cy) * \brief Creates a vh scanner from pattern, center and bounds. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, upper and lower bounds. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c1 y intercept parameter of one of the bounds - * @param c2 y intercept parameter of the other bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c1 Value of parameter 'c' of one of the support lines. + * @param c2 Value of parameter 'c' of the other support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. */ VHScannerO2 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, int nbs, bool *steps, int cx, int cy); /** - * @fn VHScanner02(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int nbs, bool *steps, - * int cx, int cy, int length) * \brief Creates a vh scanner from pattern, center and length. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, and a length value. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center - * @param length length of a scan strip + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. + * @param length Length of a scan strip. */ VHScannerO2 (int xmin, int ymin, int xmax, int ymax, int a, int b, int nbs, bool *steps, int cx, int cy, int length); /** - * @fn DirectionalScanner *getCopy (); * \brief Returns a copy of the directional scanner. */ DirectionalScanner *getCopy (); /** - * @fn first(vector<Pt2i> &scan) * \brief Returns the central scan. - * Fills in the vector with the central scan and returns its size. - * @param scan vectors of points to be filled in. + * Adds central scan points to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int first (vector<Pt2i> &scan) const; /** - * @fn nextOnLeft(vector<Pt2i> &scan) * \brief Returns the next scan on the left. - * Fills in the vector with the next scan on left and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next left scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnLeft (vector<Pt2i> &scan); /** - * @fn nextOnRight(vector<Pt2i> &scan) * \brief Returns the next scan on the right. - * Fills in the vector with the next scan on right and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next right scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnRight (vector<Pt2i> &scan); @@ -119,7 +103,6 @@ public: private : /** - * @fn VHScannerO2(VHScannerO2 *ds) * \brief Creates a copy of given directional scanner. * @param ds Source directional scanner. */ diff --git a/Code/FBSD/DirectionalScanner/vhscannero7.cpp b/Code/FBSD/DirectionalScanner/vhscannero7.cpp index e24279adbb5e6e36ab1fc0b6acc5014fa95449ab..48495ea5d9e21b35a01fa20045cbe8fab1fce20e 100755 --- a/Code/FBSD/DirectionalScanner/vhscannero7.cpp +++ b/Code/FBSD/DirectionalScanner/vhscannero7.cpp @@ -1,8 +1,6 @@ -#include <cstdlib> #include "vhscannero7.h" - VHScannerO7::VHScannerO7 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c, int nbs, bool *steps, int sx, int sy) @@ -12,7 +10,6 @@ VHScannerO7::VHScannerO7 (int xmin, int ymin, int xmax, int ymax, } - VHScannerO7::VHScannerO7 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, int nbs, bool *steps, int cx, int cy) @@ -60,7 +57,6 @@ VHScannerO7::VHScannerO7 (int xmin, int ymin, int xmax, int ymax, } - VHScannerO7::VHScannerO7 (int xmin, int ymin, int xmax, int ymax, int a, int b, int nbs, bool *steps, int cx, int cy, int length) diff --git a/Code/FBSD/DirectionalScanner/vhscannero7.h b/Code/FBSD/DirectionalScanner/vhscannero7.h index 9d79bc600655884ca43b71715a037ab47eebd6f6..0475c895e18e15063bb1b9712a5f4e88d546304e 100755 --- a/Code/FBSD/DirectionalScanner/vhscannero7.h +++ b/Code/FBSD/DirectionalScanner/vhscannero7.h @@ -3,9 +3,6 @@ #include "adaptivescannero7.h" -using namespace std; - - /** * @class VHScannerO7 vhscannero7.h @@ -16,102 +13,89 @@ class VHScannerO7 : public AdaptiveScannerO7 public: /** - * @fn VHScanner07(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int c, - * int nbs, bool *steps, int sx, int sy) * \brief Creates a vh scanner from pattern, start and upper bound. * The scan strip is composed of parallel scan lines, the first one being * defined by a start point, a line pattern, and an upper bound. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c y intercept parameter of the upper bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param sx abscissae of the central scan start point - * @param sy ordinate of the central scan start point + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c Value of parameter 'c' of the upper bounding line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param sx X-coordinate of the central scan start point. + * @param sy Y-coordinate of the central scan start point. */ VHScannerO7 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c, int nbs, bool *steps, int sx, int sy); /** - * @fn VHScanner07(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int c1, int c2, - * int nbs, bool *steps, int cx, int cy) * \brief Creates a vh scanner from pattern, center and bounds. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, upper and lower bounds. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c1 y intercept parameter of one of the bounds - * @param c2 y intercept parameter of the other bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c1 Value of parameter 'c' of one of the support lines. + * @param c2 Value of parameter 'c' of the other support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. */ VHScannerO7 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, int nbs, bool *steps, int cx, int cy); /** - * @fn VHScanner07(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int nbs, bool *steps, - int cx, int cy, int length) * \brief Creates a vh scanner from pattern, center and length. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, and a length value. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center - * @param length length of a scan strip + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. + * @param length Length of a scan strip. */ VHScannerO7 (int xmin, int ymin, int xmax, int ymax, int a, int b, int nbs, bool *steps, int cx, int cy, int length); /** - * @fn DirectionalScanner *getCopy (); * \brief Returns a copy of the directional scanner. */ DirectionalScanner *getCopy (); /** - * @fn first(vector<Pt2i> &scan) * \brief Returns the central scan. - * Fills in the vector with the central scan and returns its size. - * @param scan vectors of points to be filled in. + * Adds central scan points to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int first (vector<Pt2i> &scan) const; /** - * @fn nextOnLeft(vector<Pt2i> &scan) * \brief Returns the next scan on the left. - * Fills in the vector with the next scan on left and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next left scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnLeft (vector<Pt2i> &scan); /** - * @fn nextOnRight(vector<Pt2i> &scan) * \brief Returns the next scan on the right. - * Fills in the vector with the next scan on right and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next right scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnRight (vector<Pt2i> &scan); @@ -119,7 +103,6 @@ public: private : /** - * @fn VHScannerO7(VHScannerO7 *ds) * \brief Creates a copy of given directional scanner. * @param ds Source directional scanner. */ diff --git a/Code/FBSD/DirectionalScanner/vhscannero8.cpp b/Code/FBSD/DirectionalScanner/vhscannero8.cpp index b96c3f2ff42c952c26ac4f77a0b6d0706dd75186..a108a789e5f1731e57968275804c429d127411ad 100755 --- a/Code/FBSD/DirectionalScanner/vhscannero8.cpp +++ b/Code/FBSD/DirectionalScanner/vhscannero8.cpp @@ -1,8 +1,6 @@ -#include <cstdlib> #include "vhscannero8.h" - VHScannerO8::VHScannerO8 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c, int nbs, bool *steps, int sx, int sy) @@ -12,7 +10,6 @@ VHScannerO8::VHScannerO8 (int xmin, int ymin, int xmax, int ymax, } - VHScannerO8::VHScannerO8 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, int nbs, bool *steps, int cx, int cy) @@ -60,7 +57,6 @@ VHScannerO8::VHScannerO8 (int xmin, int ymin, int xmax, int ymax, } - VHScannerO8::VHScannerO8 (int xmin, int ymin, int xmax, int ymax, int a, int b, int nbs, bool *steps, int cx, int cy, int length) diff --git a/Code/FBSD/DirectionalScanner/vhscannero8.h b/Code/FBSD/DirectionalScanner/vhscannero8.h index f989daf397e4f393ff0639343f9b28792c9d05e3..75130bb5d74f8b005a8a193ea652dd2a23a0bb6f 100755 --- a/Code/FBSD/DirectionalScanner/vhscannero8.h +++ b/Code/FBSD/DirectionalScanner/vhscannero8.h @@ -3,9 +3,6 @@ #include "adaptivescannero8.h" -using namespace std; - - /** * @class VHScannerO8 vhscannero8.h @@ -16,102 +13,89 @@ class VHScannerO8 : public AdaptiveScannerO8 public: /** - * @fn VHScanner08(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int c, - * int nbs, bool *steps, int sx, int sy) * \brief Creates a vh scanner from pattern, start and upper bound. * The scan strip is composed of parallel scan lines, the first one being * defined by a start point, a line pattern, and an upper bound. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c y intercept parameter of the upper bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param sx abscissae of the central scan start point - * @param sy ordinate of the central scan start point + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c Value of parameter 'c' of the upper bounding line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param sx X-coordinate of the central scan start point. + * @param sy Y-coordinate of the central scan start point. */ VHScannerO8 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c, int nbs, bool *steps, int sx, int sy); /** - * @fn VHScanner08(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int c1, int c2, - * int nbs, bool *steps, int cx, int cy) * \brief Creates a vh scanner from pattern, center and bounds. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, upper and lower bounds. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param c1 y intercept parameter of one of the bounds - * @param c2 y intercept parameter of the other bound - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'b' of the discrete support line. + * @param c1 Value of parameter 'c' of one of the support lines. + * @param c2 Value of parameter 'c' of the other support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. */ VHScannerO8 (int xmin, int ymin, int xmax, int ymax, int a, int b, int c1, int c2, int nbs, bool *steps, int cx, int cy); /** - * @fn VHScanner08(int xmin, int ymin, int xmax, int ymax, - * int a, int b, int nbs, bool *steps, - * int cx, int cy, int length) * \brief Creates a vh scanner from pattern, center and length. * The scan strip is composed of parallel scan lines, the first one being * defined by a center, a line pattern, and a length value. - * @param xmin left border of the scan area - * @param ymin low border of the scan area - * @param xmax right border of the scan area - * @param ymax up border of the scan area - * @param a x coefficient of the discrete support line - * @param b y coefficient of the discrete support line - * @param nbs size of the support line pattern - * @param steps support line pattern - * @param cx abscissae of the central scan center - * @param cy ordinate of the central scan center - * @param length length of a scan strip + * @param xmin Left border of the scan area. + * @param ymin Bottom border of the scan area. + * @param xmax Right border of the scan area. + * @param ymax Top border of the scan area. + * @param a Value of parameter 'a' of the discrete support line. + * @param b Value of parameter 'a' of the discrete support line. + * @param nbs Size of the support line pattern. + * @param steps Support line pattern. + * @param cx X-coordinate of the central scan center. + * @param cy Y-coordinate of the central scan center. + * @param length Length of a scan strip. */ VHScannerO8 (int xmin, int ymin, int xmax, int ymax, int a, int b, int nbs, bool *steps, int cx, int cy, int length); /** - * @fn DirectionalScanner *getCopy (); * \brief Returns a copy of the directional scanner. */ DirectionalScanner *getCopy (); /** - * @fn first(vector<Pt2i> &scan) * \brief Returns the central scan. - * Fills in the vector with the central scan and returns its size. - * @param scan vectors of points to be filled in. + * Adds central scan points to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int first (vector<Pt2i> &scan) const; /** - * @fn nextOnLeft(vector<Pt2i> &scan) * \brief Returns the next scan on the left. - * Fills in the vector with the next scan on left and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next left scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnLeft (vector<Pt2i> &scan); /** - * @fn nextOnRight(vector<Pt2i> &scan) * \brief Returns the next scan on the right. - * Fills in the vector with the next scan on right and returns its size. - * @param scan vectors of points to be filled in. + * Adds points of next right scan to given vector and returns its new size. + * @param scan Vector of points to be completed. */ int nextOnRight (vector<Pt2i> &scan); @@ -119,7 +103,6 @@ public: private : /** - * @fn VHScannerO8(VHScannerO8 *ds) * \brief Creates a copy of given directional scanner. * @param ds Source directional scanner. */