Hello Rayana,
there were several posts on this topic in the past. Bottomline, the
information to generate the graphical output are in the realignment text
file, and you can use that to recreate them, for example using the code
snippet below (copy and paste into the Matlab command window, but beware
of linebreaks).
Hope this helps,
Marko
% ==== Start ====
filt = ['^rp_*','.*\.txt$'];
b = spm_select([Inf],'any','Select realignment parameters',[],pwd,filt);
scaleme = [-3 3];
mydata = pwd;
for i = 1:size(b,1)
[p nm e v] = spm_fileparts(b(i,:));
printfig = figure;
set(printfig, 'Name', ['Motion parameters: subject ' num2str(i) ],
'Visible', 'on');
loadmot = load(deblank(b(i,:)));
subplot(2,1,1);
plot(loadmot(:,1:3));
grid on;
ylim(scaleme); % enable to always scale between fixed values as
set above
title(['Motion parameters: shifts (top, in mm) and rotations
(bottom, in dg)'], 'interpreter', 'none');
subplot(2,1,2);
plot(loadmot(:,4:6)*180/pi);
grid on;
ylim(scaleme); % enable to always scale between fixed values as
set above
title(['Data from ' p], 'interpreter', 'none');
mydate = date;
motname = [mydata filesep 'motion_sub_' sprintf('%02.0f', i) '_'
mydate '.png'];
% print(printfig, '-dpng', '-noui', '-r100', motname); % enable to
print to file
% close(printfig); % enable to close graphic window
end;
% ==== End ====
Rayana Braich wrote:
> Dear SPM Community,
>
> I believe I have a fairly basic question but can't seem to find the
> answer. In SPM8, after using Batch mode and doing realign: estimate and
> reslice, I do not get the graph output. How do I go about solving this?
> I did read in a previous e-mail to check flags.graphics argument and set
> it to 1. However, I do not know how to do this.
>
> Any help is appreciated.
>
> Thank you,
> Rayana
--
____________________________________________________
PD Dr. med. Marko Wilke
Facharzt für Kinder- und Jugendmedizin
Leiter, Experimentelle Pädiatrische Neurobildgebung
Universitäts-Kinderklinik
Abt. III (Neuropädiatrie)
Marko Wilke, MD, PhD
Pediatrician
Head, Experimental Pediatric Neuroimaging
University Children's Hospital
Dept. III (Pediatric Neurology)
Hoppe-Seyler-Str. 1
D - 72076 Tübingen, Germany
Tel. +49 7071 29-83416
Fax +49 7071 29-5473
[log in to unmask]
http://www.medizin.uni-tuebingen.de/kinder/epn/
____________________________________________________
|