Print

Print


Buyean,

If, as Dr. Nichols suggests, you have both SPM2 and SPM5 in your path, you may need to "redo" the path when switching to SPM5 with something like this, depending on the location of your spm2 and spm5 paths:
	rmpath('c:\spm2');
      addpath('c:\spm5', '-end');
	spm('ver', [], 1);
	global defaults
	spm_defaults;

Kathy Pearson
WFUHS Radiology

________________________________________
From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]] On Behalf Of Buyean Lee
Sent: Wednesday, November 14, 2007 8:24 PM
To: [log in to unmask]
Subject: [SPM] Error message again: resize_image in SPM5

Dear SPMers,

Any comment for the following error message will be appreciated.



I am trying to reslice the image to diplay in another program.
The program is resize_img.m (http://www.sph.umich.edu/~nichols/JG5/resize_img.m).
It runs without errors in SPM2, but not in SPM5.

In SPM5, the program runs well until it needs to write the image.
Please let me know what the error following messages mean.

Thank you,

Buyean

??? Error using ==> @file_array/private/dim>asgn at 35
"dim" must be a vector of positive integers.

Error in ==> @file_array/private/dim at 16
    varargout{1} = asgn(varargin{:});

Error in ==> file_array.file_array at 32
if nargin>=2, a =       dim(a,varargin{2}); end;

Error in ==> spm_create_vol>create_vol at 77
dat    = file_array(V.fname,dim,[dt{1} '-' dt{2}],0,V.pinfo(1),V.pinfo(2));

Error in ==> spm_create_vol at 16
        v = create_vol(V(i));

Error in ==> resize_img at 101
    VO = spm_create_vol(VO);

Error in ==> spm at 756
    evalin('base',xTB(i).prog);

??? Error using ==> spm('TBlaunch',get(gcbo,'UserData'),get(gcbo,'Value')-1), set(gcbo,'Value',1)
Error using ==> @file_array/private/dim>asgn at 35
"dim" must be a vector of positive integers.

??? Error while evaluating uicontrol Callback
________________________________________
Check Out the new free AIM(R) Mail -- Unlimited storage and industry-leading spam and email virus protection.