#ifndef GRAPHICSDATAFIELDS_H
#define GRAPHICSDATAFIELDS_H
#include <vector>
#include <map>
#include <string>
#include <Utils/Coordinates3D.h>
#include "GraphicsData.h"

#include <CompuCell3D/Potts3D/Cell.h>


class GraphicsDataFields{
   public://typedef's
      typedef std::vector<std::vector<float> > floatField2D_t;
      typedef std::vector<std::vector<std::vector<float> > > floatField3D_t;
      typedef std::map<std::string,floatField3D_t*>::iterator floatField3DNameMapItr_t;
      typedef std::vector<std::vector<std::vector<Coordinates3D<float> > > > vectorFloatField3D_t;
      typedef std::map<std::string,vectorFloatField3D_t*>::iterator vectorFloatField3DNameMapItr_t;
      typedef std::vector<std::vector<std::vector<std::pair<Coordinates3D<float>,CompuCell3D::CellG*> > > > vectorCellFloatField3D_t;
      typedef std::map<std::string,vectorCellFloatField3D_t*>::iterator vectorCellFloatField3DNameMapItr_t;

      typedef std::vector<std::vector<std::vector<GraphicsData> > > field3DGraphicsData_t;
      
      
   public:
   
      GraphicsDataFields();
      ~GraphicsDataFields();
      
      unsigned int getSizeL(){return sizeL;}
      unsigned int getSizeM(){return sizeM;}
      unsigned int getSizeN(){return sizeN;}
      
      void allocateField3D(unsigned int _sizeL, unsigned int _sizeM, unsigned int _sizeN);
      void allocateFloatField3D(unsigned int _sizeL, unsigned int _sizeM, unsigned int _sizeN,std::string _name);
      void allocateVectorFloatField3D(unsigned int _sizeL, unsigned int _sizeM, unsigned int _sizeN,std::string _name);
      void allocateVectorCellFloatField3D(unsigned int _sizeL, unsigned int _sizeM, unsigned int _sizeN,std::string _name);
      
      std::vector<std::vector<std::vector<GraphicsData> > > field3DGraphicsData;/// 3d field
      floatField3D_t field3DConcentration;/// 3d field of floats
      std::map<std::string,floatField3D_t*> & getFloatField3DNameMap(){return floatField3DNameMap;}
      std::map<std::string,vectorFloatField3D_t*> & getVectorFloatField3DNameMap(){return vectorFloatField3DNameMap;}
      std::map<std::string,vectorCellFloatField3D_t*> & getVectorCellFloatField3DNameMap(){return vectorCellFloatField3DNameMap;}
      
   private:
      
      unsigned int sizeL, sizeM, sizeN;
      std::map<std::string,floatField3D_t*> floatField3DNameMap; ///this map will be filled externally
      std::map<std::string,vectorFloatField3D_t*> vectorFloatField3DNameMap; ///this map will be filled externally
      std::map<std::string,vectorCellFloatField3D_t*> vectorCellFloatField3DNameMap; ///this map will be filled externally
};


#endif
