diff --git a/stim/envi/bil.h b/stim/envi/bil.h index 4ba9dd0..956a4e1 100644 --- a/stim/envi/bil.h +++ b/stim/envi/bil.h @@ -869,12 +869,13 @@ public: tempZ[k] = temp[k*R[0] + i]; //Pass the correct spectral value from XZ page into the spectrum to be saved. } target.write(reinterpret_cast(tempZ), LZ); //write that spectrum to disk. Size is L2. + Mat M(1, R[2], CV_32FC1, tempZ); } else continue; } } - target.close(); + //target.close(); free(temp); return true; } diff --git a/stim/envi/bip.h b/stim/envi/bip.h index d89ac59..1ca1051 100644 --- a/stim/envi/bip.h +++ b/stim/envi/bip.h @@ -956,7 +956,7 @@ public: { for (unsigned k = 0; k < R[2]; k++) //Select a voxel by choosing Z coordinate at the pixel { - tempZ[k] = temp[i*R[2] + k]; //Pass the correct spectral value from XZ page into the spectrum to be saved. + tempZ[k] = temp[j*R[2] + k]; //Pass the correct spectral value from XZ page into the spectrum to be saved. } target.write(reinterpret_cast(tempZ), LZ); //write that spectrum to disk. Size is LZ. } -- libgit2 0.21.4