Dear Mahmoud,
I assume that you have been using this library:
https://sourceforge.net/projects/niftilib/files/niftimatlib/niftimatlib-1.2/
I would recommend you try again using the copy of this library that you
get when installing SPM12 as it will be much more recent.
If it still does not work, could you share the function CreateROI.m so
that I can reproduce the error? I would also send you a link to download
the latest development version of SPM12 as it contains changes that are
related, see eg
https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=spm;595a2fa.1701
Best regards,
Guillaume.
On 30/06/17 16:37, / Mahmoud Zeydabadinezhad/ wrote:
> Hello All,
>
> I have a problem using niftimatlib-1.2.
> I am running this version of MATLAB:
> MATLAB Version: 9.2.0.538062 (R2017a)
> Operating System: Linux 3.10.0-327.13.1.el7.x86_64
>
> this is the command line: CreateROI('data.nii', 'one_axial_roi.nii', 'NODDI_roi.mat');
>
> and this is the input file (data.nii) info:
> data_type FLOAT32
> dim1 106
> dim2 106
> dim3 68
> dim4 193
> datatype 16
> pixdim1 1.735849
> pixdim2 1.735849
> pixdim3 1.750000
> pixdim4 1.000000
> cal_max 0.0000
> cal_min 0.0000
> file_type NIFTI-1+
>
> and this is the error I receive in MATLAB:
>
>>> CreateROI('data.nii', 'one_axial_roi.nii', 'NODDI_roi.mat');
> loading the DWI volume : data.nii
> Error using file2mat
> Requested 225179981368524801x140284680626501 (17179869184.0GB) array exceeds maximum array size
> preference. Creation of arrays greater than this limit may take a long time and cause MATLAB to
> become unresponsive. See array size limit or preference panel for more information.
>
> Error in file_array/subsref>multifile2mat (line 182)
> val(cc(i)+1:cc(i+1)) = file2mat(obj,int32(1),int32(x(y==i)));
>
> Error in file_array/subsref>subfun (line 103)
> t = multifile2mat(sobj,varargin{:});
>
> Error in file_array/subsref (line 70)
> t = subfun(sobj,args{:});
>
> Error in nifti/subsref>rec (line 223)
> t = subsref(t,subs(2:end));
>
> Error in nifti/subsref (line 49)
> varargout = rec(opt,subs);
>
> Error in CreateROI (line 36)
> dwi = dwi.dat(:,:,:,:);
>
> I appreciate any help !
>
> Thank you!
> Mahmoud
>
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|