00001 #ifndef __IMAGESELECTIONCUBE_H 00002 #define __IMAGESELECTIONCUBE_H 00003 00004 #include "ImageCube.h" 00005 #include "PixelArray.h" 00006 00007 00024 class ImageSelectionCube : public ImageCube { 00025 00026 public: 00027 ImageSelectionCube(int x1, int y1, int w1, int h1, ImageInterface* theimage); 00028 00037 ImageSelectionCube(int x1, int y1, int w1, int h1); 00038 00043 ~ImageSelectionCube(); 00044 00051 void setSelection(std::vector<ThreeDPoint> points); 00052 00059 void setSelection(std::vector<Pixel> pixs); 00060 00065 std::string getAsString(); 00066 00072 std::string getAsString(std::string delim); 00073 std::string getAsString(std::string delim, std::ofstream &f) ; 00074 00080 std::vector<ThreeDPoint> getPoints(); 00081 00087 std::vector<Pixel> getPixels(); 00088 00089 00090 00091 protected: 00092 std::vector<ThreeDPoint> selectionPoints;//the points defining the selection 00093 std::vector<Pixel> borderPixels; //the pixels that make up the border... 00094 //currently only used when creating vector points from border pixels 00095 std::vector<Pixel> selectionPixels;//the pixels in the selection 00096 PixelArray pixelArray;//the pixels that are in the selection...for printing 00097 00107 std::vector<ThreeDPoint> generateFullLine(ThreeDPoint s, ThreeDPoint f); 00108 00127 std::vector<ThreeDPoint> generateLine(ThreeDPoint s, ThreeDPoint f); 00128 00136 std::vector<ThreeDPoint> combineSortedVectors(std::vector<ThreeDPoint> a, std::vector<ThreeDPoint> b); 00137 00145 std::vector<ThreeDPoint> removeDuplicates(std::vector<ThreeDPoint> theVec); 00146 00147 //std::vector<Pixel> getBoundaryPixels(std::vector<Pixel> pixs); 00148 00154 std::vector<ThreeDPoint> generatePoints(std::vector<Pixel> pixs); 00155 00162 std::vector<double> getAngles(std::vector<ImageCube::Pixel> points); 00163 00170 std::vector<ImageCube::ThreeDPoint> getPointsFromAngles(std::vector<double> angles); 00171 00172 }; 00173 00174 #endif 00175
Home |
Search |
Disclaimers & Privacy |
Contact Us GLIMSView Maintainer: dsoltesz@usgs.gov |