Commit 4b65554a597504b6ce76232666bae71311849d33
1 parent
324a4dfa
fixed index bug in sift-mask
Showing
2 changed files
with
3 additions
and
2 deletions
Show diff stats
stim/envi/bil.h
... | ... | @@ -869,12 +869,13 @@ public: |
869 | 869 | tempZ[k] = temp[k*R[0] + i]; //Pass the correct spectral value from XZ page into the spectrum to be saved. |
870 | 870 | } |
871 | 871 | target.write(reinterpret_cast<const char*>(tempZ), LZ); //write that spectrum to disk. Size is L2. |
872 | + Mat M(1, R[2], CV_32FC1, tempZ); | |
872 | 873 | } |
873 | 874 | else |
874 | 875 | continue; |
875 | 876 | } |
876 | 877 | } |
877 | - target.close(); | |
878 | + //target.close(); | |
878 | 879 | free(temp); |
879 | 880 | return true; |
880 | 881 | } | ... | ... |
stim/envi/bip.h
... | ... | @@ -956,7 +956,7 @@ public: |
956 | 956 | { |
957 | 957 | for (unsigned k = 0; k < R[2]; k++) //Select a voxel by choosing Z coordinate at the pixel |
958 | 958 | { |
959 | - tempZ[k] = temp[i*R[2] + k]; //Pass the correct spectral value from XZ page into the spectrum to be saved. | |
959 | + tempZ[k] = temp[j*R[2] + k]; //Pass the correct spectral value from XZ page into the spectrum to be saved. | |
960 | 960 | } |
961 | 961 | target.write(reinterpret_cast<const char*>(tempZ), LZ); //write that spectrum to disk. Size is LZ. |
962 | 962 | } | ... | ... |