I set ndim to 3, dim[5] is 1
I'm not sure where the '160' comes from
header file 'bold_pvalues_contrast1_EPI.nii.gz', num_fields = 43
all fields:
name offset nvals values
------------------- ------ ----- ------
sizeof_hdr 0 1 348
data_type 4 10
db_name 14 18
extents 32 1 0
session_error 36 1 0
regular 38 1 r
dim_info 39 1 48
dim 40 8 3 64 64 33 1 1 1 1
intent_p1 56 1 0.0
intent_p2 60 1 0.0
intent_p3 64 1 0.0
intent_code 68 1 22
datatype 70 1 16
bitpix 72 1 32
slice_start 74 1 0
pixdim 76 8 1.0 3.125 3.125 4.0 2.0 0.0 0.0 0.0
vox_offset 108 1 5264.0
scl_slope 112 1 1.0
scl_inter 116 1 0.0
slice_end 120 1 32
slice_code 122 1 0
xyzt_units 123 1 10
cal_max 124 1 1.0
cal_min 128 1 0.0
slice_duration 132 1 0.0
toffset 136 1 0.0
glmax 140 1 0
glmin 144 1 0
descrip 148 80
aux_file 228 24
qform_code 252 1 3
sform_code 254 1 3
quatern_b 256 1 0.0
quatern_c 260 1 -0.0
quatern_d 264 1 0.0
qoffset_x 268 1 -0.0
qoffset_y 272 1 -0.0
qoffset_z 276 1 0.0
srow_x 280 4 3.125 -0.0 -0.0 -0.0
srow_y 296 4 -0.0 3.125 -0.0 -0.0
srow_z 312 4 0.0 0.0 4.0 0.0
intent_name 328 16
magic 344 4 n+1