00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef __FIREVISION_MODELS_SHAPE_LINE_H_
00026 #define __FIREVISION_MODELS_SHAPE_LINE_H_
00027
00028 #include <vector>
00029 #include <iostream>
00030
00031 #include <fvutils/base/types.h>
00032 #include <fvutils/base/roi.h>
00033 #include <models/shape/shapemodel.h>
00034
00035 namespace firevision {
00036 #if 0
00037 }
00038 #endif
00039
00040 class LineShape : public Shape
00041 {
00042 friend class HtLinesModel;
00043 friend class RhtLinesModel;
00044 public:
00045 LineShape(unsigned int roi_width, unsigned int roi_height);
00046 ~LineShape();
00047
00048 void printToStream(std::ostream &stream);
00049 void setMargin( unsigned int margin );
00050 bool isClose(unsigned int in_roi_x, unsigned int in_roi_y);
00051
00052 void calcPoints();
00053 void getPoints(int *x1, int *y1, int *x2, int *y2);
00054
00055 private:
00056 float r;
00057 float phi;
00058 int count;
00059 unsigned int margin;
00060 int max_length;
00061
00062 unsigned int roi_width;
00063 unsigned int roi_height;
00064
00065 float last_calc_r;
00066 float last_calc_phi;
00067
00068 int x1;
00069 int y1;
00070 int x2;
00071 int y2;
00072
00073
00074 };
00075
00076 }
00077
00078 #endif // __FIREVISION_MODELS_SHAPE_LINE_H_