Hello,
the SPM 'Graphics' window must be opened beforehand:
spm_figure('GetWin','Graphics');
if it still crashes, you also need to reset the global variable st:
clear global st
and it should then work fine:
spm_orthviews('image',fullfile(spm('dir'),'canonical','single_subj_T1.nii'));
Best regards,
Guillaume.
HR Kang wrote:
> Dear SPM experts,
>
> I tried using spm_orthviews in command line and got the following error.
> I read 'help spm_orthviews' but still cannot find the reason. What
> things should I do to use spm_orthviews in command line? I'm using SPM5
> with update 1782.
>
>>> h = spm_orthviews('image', 'c:\spm5\canonical\single_subj_T1.nii',
> [10 10 100 100]);
> ??? Error using ==> axes
> Invalid object handle.
>
> Error in ==> spm_orthviews>specify_image at 736
> ax =
> axes('Visible','off','DrawMode','fast','Parent',st.fig,'DeleteFcn',DeleteFcn,...
>
> Error in ==> spm_orthviews at 221
> H = specify_image(varargin{1});
>
>
> Thanks in advance for your help.
>
> Sincerely,
> HR Kang.
--
Guillaume Flandin, PhD
Wellcome Trust Centre for Neuroimaging
University College London
12 Queen Square
London WC1N 3BG
|