Skip to content

Commit

Permalink
[bug] fix int16 type typo, fangq/iso2mesh#83
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Feb 5, 2025
1 parent 681db4a commit 2b6d139
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nii2jnii.m
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
'uint8' 0 % unknown %
'uint8' 0 % binary (1 bit/voxel) %
'uint8' 1 % unsigned char (8 bits/voxel) %
'uint16' 1 % signed short (16 bits/voxel) %
'int16' 1 % signed short (16 bits/voxel) %
'int32' 1 % signed int (32 bits/voxel) %
'single' 1 % float (32 bits/voxel) %
'single' 2 % complex (64 bits/voxel) %
Expand Down Expand Up @@ -236,7 +236,7 @@
nii.img = fread(fid, imgbytenum, [nii.datatype '=>' nii.datatype]);
fclose(fid);
else
nii.img = typecast(gzdata(nii.hdr.vox_offset + 1:nii.hdr.vox_offset + imgbytenum), nii.datatype);
nii.img = typecast(gzdata(double(nii.hdr.vox_offset + 1):double(nii.hdr.vox_offset + imgbytenum)), nii.datatype);
end
end

Expand Down

0 comments on commit 2b6d139

Please sign in to comment.