00001 #ifndef _ImageSet_H 00002 #define _ImageSet_H 00003 00004 #include <stdio.h> 00005 00006 00007 00026 #include "AnImage.hpp" 00027 00028 class ImageSet 00029 { 00030 protected: 00031 00032 int n,nmax; 00033 AnImage** image; 00034 00035 public: 00036 00037 ImageSet(int nMax=256); 00038 virtual ~ImageSet(); 00039 00040 AnImage* get(int i){return image[i];} 00041 void set(int i, AnImage* im){image[i]= im;} 00042 00043 int getWidth(){ return (image[0] == 0 ? 0 : image[0]->getWidth()); } 00044 int getHeight(){ return (image[0] == 0 ? 0 : image[0]->getHeight()); } 00045 int getChannels(){ return (image[0] == 0 ? 0 : image[0]->getChannels()); } 00046 int getChannelDepth(){ return (image[0] == 0 ? 0 : image[0]->getPower2MaxRangeBoundary()); } 00047 00048 virtual int get(int z, int x, int y, int c=0){ return image[z]->get(c,x,y); } 00049 00050 virtual void set(int z, int x, int y, int val){ image[z]->setGrey(x,y, val); } 00051 virtual void set(int z, int x, int y, int c, int val){ image[z]->set(x,y,c, val); } 00052 }; 00053 00054 #endif