Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

RawReader.h

00001 
00008 #ifndef _RAWREADER_
00009 #define _RAWREADER_
00010 
00011 #include <string>
00012 #include <vector>
00013 
00014 #include "LifeVariables.h"
00015 #include "Error.h"
00016 #include "osdir.h"
00017 
00018 using namespace std;
00019 
00020 class RawReader {
00021   private:          
00023     bool openFlag;
00024     
00029     bool openDirFlag;
00030   
00031     // public class attributes and functions
00032   public:
00033   
00035     typedef struct {
00037         string name;
00039         string path;
00040     } FileDescription;
00041 
00043     FileDescription *fd;
00044     
00046     vector<FileDescription*> fileList;
00047     
00049     unsigned short dimX;
00050     
00052     unsigned short dimY;
00053     
00055     unsigned short dimZ;
00056 
00058     unsigned int size;
00059     
00061     unsigned short *voxelData;
00062     
00064     ifstream *fileStream;
00065     
00067     string fileInfoString;
00068     
00073     RawReader();
00074     
00078     ~RawReader() {
00079         if(openFlag) {
00080             close();
00081         }
00082         fileList.clear();
00083     };
00084 
00089     void openPath(string pathName) throw (Error);
00090     
00095     void open(int index);
00096     
00101     void close();
00102     
00107     char* getFileNameAt(int index) throw(Error);
00108     
00118     bool isFileOpen() { return this->openFlag; };
00119     
00128     bool isDirOpen() { return this->openDirFlag; };
00129    
00130 };
00131 #endif

Generated on Mon Dec 12 15:20:26 2005 for CCube by  doxygen 1.4.1