Region.h

Go to the documentation of this file.
00001 #pragma once
00002 
00003 //Refereanser til eksternt grensesnitt/kode som anvendes i denne filen
00004 #include <vector>
00005 #include "Pixel.h"
00006 
00007 //Denne kilden bruker kode definert i navnerommet std
00008 using namespace std;
00009 
00010 
00018 class Region
00019 {
00020 
00022         vector<Pixel> pixels;
00023 
00025         vector<Pixel> border;
00026 
00028         Pixel centroid;
00029 
00031         int boundingBox [4];
00032 
00034         int window;
00035 
00037         bool calculated;
00038         
00041         float **featureVector;
00042 
00044         int r;
00045         
00047         int g;
00048         
00050         int b;
00051 
00052 public:
00053 
00063         Region(vector<Pixel> &_pixels, vector<Pixel> &_border, int _r, int _g, int _b);
00064 
00065 
00069         ~Region();
00070 
00071 
00075         void calculateCentroid();
00076 
00077 
00081         void calculateBoundingBox();
00082 
00083 
00089         void setWindow(int window);
00090 
00091 
00097         Pixel getCentroid();
00098 
00099 
00105         int getArea();
00106 
00107 
00108 
00114         int * getBoundingBox();
00115 
00116 
00117 
00123         int getWindow();
00124 
00125 
00126 
00132         vector<Pixel> getPixels();
00133 
00134 
00140         vector<Pixel> getBorder();
00141 
00142 
00143 
00147         void setCalculated();
00148 
00149 
00150 
00156         bool getCalculated();
00157 
00158 
00164         void setFeatureVectorRowSize(int numberOfFeatureCandidates);
00165 
00166 
00174         void setFeatureVectorValue(int row, int cols, float *values);
00175 
00176 
00177 
00186         float getFeatureValue(int row, int col);
00187 
00188 
00189 
00195         int getR();
00196 
00197 
00203         int getG();
00204 
00205 
00211         int getB();
00212 
00213 };

Generated on Sun May 21 10:54:04 2006 for Automatisk visuelt inspeksjonssytem by  doxygen 1.4.6-NO