line.h
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 class LineShape : public Shape
00036 {
00037 friend class HtLinesModel;
00038 friend class RhtLinesModel;
00039 public:
00040 LineShape(unsigned int roi_width, unsigned int roi_height);
00041 ~LineShape();
00042
00043 void printToStream(std::ostream &stream);
00044 void setMargin( unsigned int margin );
00045 bool isClose(unsigned int in_roi_x, unsigned int in_roi_y);
00046
00047 void calcPoints();
00048 void getPoints(int *x1, int *y1, int *x2, int *y2);
00049
00050 private:
00051 float r;
00052 float phi;
00053 int count;
00054 unsigned int margin;
00055 int max_length;
00056
00057 unsigned int roi_width;
00058 unsigned int roi_height;
00059
00060 float last_calc_r;
00061 float last_calc_phi;
00062
00063 int x1;
00064 int y1;
00065 int x2;
00066 int y2;
00067
00068
00069 };
00070
00071 #endif // __FIREVISION_MODELS_SHAPE_LINE_H_
00072