00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef LAYERS_H
00021 #define LAYERS_H
00022 #include <string>
00023 #include <vector>
00024 #include <stdexcept>
00025 #include <iostream>
00026 #include <sstream>
00027
00028 #include <QColor>
00029
00030
00031 #include "BaseRegmas.h"
00032
00033 using namespace std;
00034
00035 struct LegendItems;
00036 struct ReclassRules;
00037
00039
00047 class Layers : public BaseRegmas{
00048
00049 public:
00051 Layers( ThreadManager* MTHREAD_h,
00052 string name_h,
00053 string label_h,
00054 bool isInteger_h,
00055 bool dynamicContent_h,
00056 string fullFilename_h );
00057 ~Layers();
00059 void addLegendItem( int ID_h,
00060 string label_h,
00061 int rColor_h,
00062 int gColor_h,
00063 int bColor_h,
00064 double minValue_h,
00065 double maxValue_h );
00067 QColor getColor(double ID_h);
00069 string getCategory(double ID_h);
00071 void addReclassificationRule(int inCode_h, int outCode_h, double p_h);
00073 double filterExogenousDataset(double code_h);
00075 void countMyPixels(bool debug=false);
00077 void randomShuffle();
00079 bool getIsInteger() {return isInteger;};
00081 void print();
00083 void printBinMap();
00084
00085 string getName(){return name;};
00087 string getFilename(){return fullFileName;}
00089 bool getDynamicContent(){return dynamicContent;}
00090
00091
00092 private:
00093 string name;
00094 string label;
00095 bool isInteger;
00096 bool dynamicContent;
00097 string fullFileName;
00098 vector<LegendItems> legendItems;
00099 vector<ReclassRules> reclassRulesVector;
00100 };
00101
00103
00109 struct LegendItems {
00110 int ID;
00111 string label;
00112 int rColor;
00113 int gColor;
00114 int bColor;
00115 double minValue;
00116 double maxValue;
00117 int cashedCount;
00118 };
00119
00121
00129 struct ReclassRules{
00130 int inCode;
00131 int outCode;
00133 double p;
00134 };
00135
00136 #endif