Dear Thomas,
I don't manage to reproduce this with either the -nodisplay or
-noFigureWindows flags. If the Graphics window displays "Welcome to
SPM12", this means you called 'spm fmri', which shouldn't be necessary
if you are running SPM in batch mode.
https://en.wikibooks.org/wiki/SPM/Headless
Using the following command created a file checkreg.ps with the right
content. Does this work for you too?
%%%% checkreg.m %%%%
addpath /home/gflandin/spm12
spm_check_registration(fullfile(spm('Dir'),'canonical','single_subj_T1.nii'));
spm_print('checkreg.ps','Graphics');
exit(0);
%%%%%%%%%%%%%%%%%%%%
$ matlab -nodesktop -nodisplay -nosplash -r checkreg
Best regards,
Guillaume.
On 10/04/2019 11:53, Thomas Ernst wrote:
> Dear experts,
>
> I am running MATLAB (R2018a) with SPM (SPM12, 7487) without display from terminal on a linux machine (matlab -nodisplay) .
>
> After I generated some invisible figure (by using say spm_check_registration) I can generate a .ps file by calling spm_print. Which is very nice indeed, as my Mac would usually return an Java error at this point.
>
> However, the graphics window image in my ps file is partly hidden behind the SPM12 startup display ("Welcome to SPM12 ...").
> Executing spm_figure('clear') before 'spm_print' does not help to clear away the welcome image.
>
> Has anybody also run in this problem and maybe found a nice workaround?
>
>
> Best regards,
>
> Thomas
>
--
Guillaume Flandin, PhD
Wellcome Centre for Human Neuroimaging
UCL Queen Square Institute of Neurology
London WC1N 3BG
|