00001 #ifndef __IMAGECUBE_H 00002 #define __IMAGECUBE_H 00003 00004 #include <vector> 00005 #include "ImageInterface.h" 00006 00015 class ImageCube { 00016 00017 public: 00018 00020 typedef struct{ 00021 double x; 00022 double y; 00023 int z; 00024 } ThreeDPoint; 00025 00027 typedef struct{ 00028 int x; 00029 int y; 00030 } Pixel; 00031 00032 protected: 00033 00037 typedef struct{ 00038 int layernum; 00039 std::vector<double> * values; 00040 } Layer ; 00041 00042 ImageInterface* image; 00043 int width; 00044 int height; 00045 int layers; 00046 ThreeDPoint lowestPoint; 00047 ThreeDPoint highestPoint; 00048 00049 std::vector<Layer> theCube; 00050 00051 public: 00052 00053 ImageCube(int x1, int y1, int w1, int h1, ImageInterface* theimage); 00054 00062 ImageCube(int x1, int y1, int w1, int h1); 00063 00067 ~ImageCube(); 00068 00073 std::vector<double> * getValuesOf(int z) ; 00074 00082 double getValueAtLocal(int x, int y, int z); 00083 00084 00093 double getValueAtOverall(int x, int y, int z); 00094 00100 ThreeDPoint getLowestPoint(); 00101 00107 ThreeDPoint getHighestPoint(); 00108 00114 bool addBand(std::vector<double>* vals); 00115 00122 bool addBand(std::vector<double>* vals, int layernum); 00123 00131 bool addBands(std::vector<double>* vals); 00132 00133 }; 00134 00135 #endif 00136 00137
Home |
Search |
Disclaimers & Privacy |
Contact Us GLIMSView Maintainer: dsoltesz@usgs.gov |