diff --git a/stim/envi/agilent_binary.h b/stim/envi/agilent_binary.h index 91169fb..b30cb2a 100644 --- a/stim/envi/agilent_binary.h +++ b/stim/envi/agilent_binary.h @@ -5,6 +5,8 @@ #include #include #include +#include +#include //CUDA //#ifdef CUDA_FOUND @@ -62,17 +64,20 @@ public: /// Default constructor, sets the resolution to zero and the data pointer to NULL agilent_binary(){ memset(R, 0, sizeof(size_t) * 3); //set the resolution to zero + memset(Z, 0, sizeof(double) * 2); ptr = NULL; } /// Constructor with resolution agilent_binary(size_t x, size_t y, size_t z){ alloc(x, y, z); + memset(Z, 0, sizeof(double) * 2); } /// Constructor with filename agilent_binary(std::string filename){ ptr = NULL; + memset(Z, 0, sizeof(double) * 2); load(filename); } @@ -119,6 +124,8 @@ public: ptr = (T*) malloc(bytes()); //allocate space for the data infile.read((char*)ptr, bytes()); //read the data infile.close(); + Z[0] = 1; + Z[1] = R[2]; } void save(std::string filename){ -- libgit2 0.21.4