vrcore  0.45
visuReal Messkern
 All Classes Files Functions Variables
RoiBuilder.h
Go to the documentation of this file.
1 #pragma once
2 
3 
10 class RoiBuilder : public Logable
11  {
12  protected:
13  bool bStopped, bVertContinue, bHorzContinue;
14  int horzProcess, vertProcess;
15  int nLeft, nRight, nTop, nBottom; // obere grenze
16  int rLeft, rRight, rTop, rBottom; // resetValue
17  int iLeft, iRight, iTop, iBottom; // Laufvariable
18  RoiRect absoluteBox, rBounding;
19  cv::Point ptCenter;
20  cv::Size stepSize, roiSize;
21 
22  void absoluteCenter ();
23  void boundSteps ();
24  void boundCenter ();
25  bool checkBounding (RoiRect &rRoi);
26  bool setRoiValues (int nX, int nY, RoiRect &rRoi);
27  int getVertStep () const;
28  int getHorzStep () const;
29  void resetVert ();
30  void resetHorz ();
31  bool hasVertSteps () const { return iBottom < nBottom || iTop < nTop; }
32  bool hasHorzSteps () const { return iRight < nRight || iLeft < nLeft; }
33  void nextStep ();
34  bool nextHorzStep ();
35  bool nextVertStep ();
36  public:
37  RoiBuilder ();
38  RoiBuilder (int roiSize, int stepSize);
39  RoiBuilder (cv::Size size, int roiSize, int stepSize);
40 
41  void setRoiBuilder (cv::Size size);
42  void setRoiBuilder (int roiSize, int stepSize);
43  void setRoiBuilder (cv::Size size, int roiSize, int stepSize);
44 
45  void setRoiBuilder (RoiRect &absoluteBox);
46  void setRoiBuilder (RoiRect &absoluteBox, cv::Size &roiSize, cv::Size &stepSize);
47 
48  void reset ();
49  bool nextRoiRect (RoiRect &rRoi);
50  void setUnbounded (cv::Point &ptCenter);
51  void setBoundingBox (cv::Point &ptCenter, RoiRect &rBox);
52  void setBoundingSize (cv::Point &ptCenter, cv::Size &leftTop, cv::Size &rightBottom);
53  void setBoundingPoints (cv::Point &ptCenter, cv::Point &ptTopLeft, cv::Point & ptBottomRight);
54  void setBoundingCordinates (cv::Point &ptCenter, int x0, int y0, int x1, int y1);
55  void setBoundingSteps (int x0, int y0, int nSteps);
56  void setBoundingSteps (int x0, int y0, int horzSteps, int vertSteps);
57  void setBoundingSteps (int x0, int y0, int nLeft, int nTop, int nRight, int nBottom);
58  void setBoundingSteps(cv::Point &ptCenter, int nSteps);
59  void setBoundingSteps(cv::Point &ptCenter, int nLeft, int nTop, int nRight, int nBottom);
60  void expandBySteps (int nLeft, int nTop, int nRight, int nBottom);
61  };
Definition: Processable.h:18
Definition: RoiBuilder.h:10