pars=zeros(i1,i2,i3,2); %files={'k1.nrrd','k2.nrrd','vbf.nrrd'}; files={'k1.nrrd','vbf.nrrd'}; for i=1:2 h1=nhdr_nrrd_read(fullfile(path,[patientID '_' files{i}]),1); pars(:,:,:,i)=h1.data; end