Commit e38fc0c3cb525b25ea687cdc18d15beb766a9162

Authored by David Mayerich
1 parent 332925ad

header file wavelength fixes, Linux fixes

Showing 1 changed file with 7 additions and 0 deletions   Show diff stats
stim/envi/agilent_binary.h
... ... @@ -5,6 +5,8 @@
5 5 #include <string>
6 6 #include <fstream>
7 7 #include <complex>
  8 +#include <cstring>
  9 +#include <chrono>
8 10  
9 11 //CUDA
10 12 //#ifdef CUDA_FOUND
... ... @@ -62,17 +64,20 @@ public:
62 64 /// Default constructor, sets the resolution to zero and the data pointer to NULL
63 65 agilent_binary(){
64 66 memset(R, 0, sizeof(size_t) * 3); //set the resolution to zero
  67 + memset(Z, 0, sizeof(double) * 2);
65 68 ptr = NULL;
66 69 }
67 70  
68 71 /// Constructor with resolution
69 72 agilent_binary(size_t x, size_t y, size_t z){
70 73 alloc(x, y, z);
  74 + memset(Z, 0, sizeof(double) * 2);
71 75 }
72 76  
73 77 /// Constructor with filename
74 78 agilent_binary(std::string filename){
75 79 ptr = NULL;
  80 + memset(Z, 0, sizeof(double) * 2);
76 81 load(filename);
77 82 }
78 83  
... ... @@ -119,6 +124,8 @@ public:
119 124 ptr = (T*) malloc(bytes()); //allocate space for the data
120 125 infile.read((char*)ptr, bytes()); //read the data
121 126 infile.close();
  127 + Z[0] = 1;
  128 + Z[1] = R[2];
122 129 }
123 130  
124 131 void save(std::string filename){
... ...