00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #if !defined(_IMAGEFEATURES_H_)
00024 #define _IMAGEFEATURES_H_
00025
00026 #include "JTime.h"
00027 #include "Bitmap.h"
00028 #include "Collections.h"
00029 #include "MathClasses.h"
00030
00031 namespace cmlabs {
00032
00033 #define FEATURE_POINT 1
00034 #define FEATURE_LINE 2
00035 #define FEATURE_POLYLINE 3
00036
00037
00038 class ImageFeature : public Object {
00039 public:
00040 ImageFeature();
00041 virtual ~ImageFeature();
00042
00043 ImageFeature* createImageFeatureFromXML(JString xml);
00044 ImageFeature* createImageFeatureFromXML(XMLNode* node);
00045
00046 int featureType;
00047 JString creator;
00048 JTime frameTime;
00049 double planeDepth;
00050 };
00051
00052
00053
00054 class ImagePointFeature : public ImageFeature {
00055 public:
00056 ImagePointFeature(JString creator, JTime t, double depth);
00057 ImagePointFeature(JString xml);
00058 ImagePointFeature(XMLNode* node);
00059 ~ImagePointFeature();
00060
00061 Object* clone() const;
00062
00063 PointFloat point;
00064 Color color;
00065
00066 PointFloat getPoint();
00067 Color getColor();
00068
00069 bool setPoint(PointFloat p);
00070 bool setColor(Color c);
00071
00072 JString print();
00073 JString toXML();
00074 bool fromXML(XMLNode* node);
00075 };
00076
00077
00078
00079 class ImageLineFeature : public ImageFeature {
00080 public:
00081 ImageLineFeature(JString creator, JTime t, double depth);
00082 ~ImageLineFeature();
00083 ImageLineFeature(JString xml);
00084 ImageLineFeature(XMLNode* node);
00085
00086 Object* clone() const;
00087
00088 Line line;
00089 Color colorAverage;
00090 Color colorStartPoint;
00091 Color colorEndPoint;
00092 Color colorLeftEdge;
00093 Color colorRightEdge;
00094
00095 Line getLine();
00096 Color getAverageColor();
00097 Color getColorStartPoint();
00098 Color getColorEndPoint();
00099 Color getColorLeftEdge();
00100 Color getColorRightEdge();
00101
00102 bool setColor(Color c);
00103 bool setColor(Color colorAtStartPoint, Color colorAtEndPoint);
00104 bool setColor(Color colorAtStartPoint, Color colorAtEndPoint, Color colorAtLeftEdge, Color colorAtRightEdge);
00105
00106 JString print();
00107 JString toXML();
00108 bool fromXML(XMLNode* node);
00109 };
00110
00111
00112 class ImagePolyLineFeature : public ImageFeature {
00113 public:
00114 ImagePolyLineFeature(JString creator, JTime t, double depth);
00115 ~ImagePolyLineFeature();
00116 ImagePolyLineFeature(JString xml);
00117 ImagePolyLineFeature(XMLNode* node);
00118
00119 Object* clone() const;
00120
00121 PolyLine polyLine;
00122 Color color;
00123
00124 PolyLine getPolyLine();
00125 Color getColor();
00126
00127 bool setPolyLine(PolyLine polyline);
00128 bool setColor(Color c);
00129
00130 JString print();
00131 JString toXML();
00132 bool fromXML(XMLNode* node);
00133 };
00134
00135 }
00136
00137
00138 #endif // _IMAGEFEATURES_H_
00139