We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8392b54 commit bdbd77bCopy full SHA for bdbd77b
nii2jnii.m
@@ -208,10 +208,6 @@
208
return
209
end
210
211
-if (type2str{typeidx, 2} > 1)
212
- nii.hdr.dim = [nii.hdr.dim(1) + 1 uint16(nii.datalen) nii.hdr.dim(2:end)];
213
-end
214
-
215
if (nargin > 1 && strcmp(format, 'niiheader'))
216
217
@@ -222,6 +218,10 @@
222
218
223
219
imgbytenum = prod(double(nii.hdr.dim(2:nii.hdr.dim(1) + 1))) * nii.voxelbyte;
224
220
221
+if (type2str{typeidx, 2} > 1)
+ nii.hdr.dim = [nii.hdr.dim(1) + 1 uint16(nii.datalen) nii.hdr.dim(2:end)];
+end
+
225
if (isnii == 0 && ~isempty(regexp(filename, '\.[Gg][Zz]$', 'once')))
226
finput = fopen(filename, 'rb');
227
input = fread(finput, inf, 'uint8=>uint8');
0 commit comments