00001 00007 #pragma once 00008 00009 #include <string> 00010 #include <vector> 00011 00013 00015 class DataLayer { 00016 private: 00017 std::string name; 00018 std::vector<float> data; 00019 00020 unsigned size[3]; 00021 unsigned indexsize; 00022 00023 float minimum,maximum; 00024 00025 public: 00026 DataLayer( const std::string &name, 00027 const unsigned &xsize, 00028 const unsigned &ysize, 00029 const unsigned &zsize, 00030 const std::vector<float> &data); 00031 DataLayer(const DataLayer &layer); 00032 ~DataLayer(); 00033 00034 DataLayer &operator=(const DataLayer &layer); 00035 00036 void setName(const std::string &name); 00037 const std::string &getName() const; 00038 00039 void normalise(const float &scale, const float &offset); 00040 00041 float &getData(const unsigned &indexx,const unsigned &indexy,const unsigned &indexz); 00042 float *getArray(); 00043 std::vector<float> &getDataVector(); 00044 00045 const float &getMin() const; 00046 const float &getMax() const; 00047 00048 const unsigned &getXSize() const; 00049 const unsigned &getYSize() const; 00050 const unsigned &getZSize() const; 00051 00052 const unsigned getSize() const; 00053 };