Skip to content

Commit a8c2d1e

Browse files
authored
Merge pull request #2147 from MRtrix3/nifti2_read_fix
NIfTI2: Fix read following #1540
2 parents 7b41262 + 3b52aad commit a8c2d1e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/file/nifti_utils.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ namespace MR
8181
using dim_type = typename Type<NiftiHeader>::dim_type;
8282
using code_type = typename Type<NiftiHeader>::code_type;
8383
using float_type = typename Type<NiftiHeader>::float_type;
84+
using vox_offset_type = typename Type<NiftiHeader>::vox_offset_type;
8485

8586
bool is_BE = false;
8687
if (Raw::fetch_<int32_t> (&NH.sizeof_hdr, is_BE) != sizeof(NH)) {
@@ -217,7 +218,7 @@ namespace MR
217218

218219

219220

220-
const int64_t data_offset = Raw::fetch_<float_type> (&NH.vox_offset, is_BE);
221+
const int64_t data_offset = Raw::fetch_<vox_offset_type> (&NH.vox_offset, is_BE);
221222

222223

223224

0 commit comments

Comments
 (0)