Daniel,
Here are some lines you might try:
(1)
matlab
spm_defaults;
spmdir = fileparts(which('spm'));
fname = fullfile(spmdir, 'templates', 'EPI.nii');
v = spm_vol(fname);
vol = spm_read_vols(v);
If #1 fails, then if you think the problem is in spm_vol_nifti:
(2)
matlab
spm_defaults;
spmdir = fileparts(which('spm'));
fname = fullfile(spmdir, 'templates', 'EPI.nii');
n = [1 1];
... drag and drop every matlab statement AFTER this one
if nargin<2, n = [1 1]; end;
... from spm_vol_nifti to your matlab command window
That might give you some info. Also, you may want to use some other
file name from the templates directory or elsewhere.
If you have trouble when you reference this line in spm_vol_nifti:
N = nifti(fname);
that may indicate that the SPM version 5 code is not on top in your
matlab path. If your SPM5 path is here:
/code/spm5
and other SPM versions exist, then these commands may be needed for
setup:
addpath('/code/spm5');
spmver = spm('ver', [], 1);
disp(['setting paths for version ... ' spmver]);
spm_defaults;
Kathy Pearson
WFUHS Radiology
-----Original Message-----
From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]]
On Behalf Of Daniel Schwartz
Sent: Tuesday, July 24, 2007 1:07 PM
To: [log in to unmask]
Subject: Re: [SPM] Still can't get SPM5 to Display... Help?
Thankyou all for your help.
I still can't get SPM5 to display a single file. It still hangs, exactly
like it did before. However, I followed Ged Ridgeway's advice (after
recompiling the mex functions as per Kathy Pearson's advice) and tried
to step through each function. It seems that it hangs on every call to
access the array "N.mat". In particular, when I try to load EPI.nii from
the templates folder, it hangs on line 28 of "spm_vol_nifti", "mat =
N.mat". Calls to most of the other fields in the N object seem to go
just fine, such as "X = double(N.dat);" which is a fairly large array,
(~90x90x90), so I don't think that the cpu is just getting drowned by
the sheer array sizes or anything. Does anyone have any advice about
getting SPM5 working on my poor unfortunate Linux box?
Commands to reproduce my error:
> file = fullfile(spm('dir'), 'templates', 'EPI.nii');
> dbstop in spm_vol_nifti
> vol = spm_vol(file)
> <<F10 to line 28>>
Fedora Core 6 (Zod), Dual Quad Core Intel 2.33 GHz Processors, 4 GB RAM,
gcc v4.1.2, MATLAB R2006b.
Thankyou! My modified Makefile is attached...
-Daniel
Daniel Schwartz, CIC
Functional Brain Imaging Lab
Oregon Health & Sciences University
3181 SW Sam Jackson Pk. Rd.
Portland, OR 97239
(503) 494-6494
>>> "Kathy Pearson" <[log in to unmask]> 07/11/07 8:04 AM >>>
Daniel,
Attached are the commands that I use to recompile the MEX functions for
RedHat 64-bit Linux. Note that your matlab path may be different.
Kathy Pearson
WFUHS Radiology
-----Original Message-----
From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]]
On Behalf Of Daniel Schwartz
Sent: Tuesday, July 10, 2007 3:04 PM
To: [log in to unmask]
Subject: [SPM] Still can't get SPM5 to Display... Help?
MATLAB R2006b 64-bit, SPM5, Fedora Core 6 (linux) x86-64, Intel Dual
Quad-core 2.33 Ghz, 4GB RAM.
Hello all!
I've downloaded latest updates, updated (overwritten) all the applicable
files, and run "make && make install" from ~/spm5/src. I start MATLAB, I
run "spm fmri", I click Display, I choose ~/spm5/templates/EPI.nii, And
I just get a spinner forever. Does anyone have any advice? There is no
error message printed at all and I don't know mex, otherwise I'd chase
this down myself.
Thankyou for any and all help...
-Daniel Schwartz
|