Dear Guillaume and SPM community,
The problem is solved pretty easily. I had to set new figure position parameters and calculate the value of ratio new/old figure proportions (1.7 in my case) which can included in the script, what gives the necessary result (attached) .
set(1, 'Position', [600 40 1000 800])
global st
h = 1;
for i=1:nnz(~cellfun('isempty',st.vols))
p1 = get(st.vols{i}.ax{1}.ax,'Position');
p2 = get(st.vols{i}.ax{2}.ax,'Position');
p3 = get(st.vols{i}.ax{3}.ax,'Position');
l = p1(3) + p2(3) + p3(3); sc = (1-0.01)/l;
p1 = p1*sc; p2 = p2 * sc; p3 = p3 * sc;
p1(4)=p1(4)*1.7; p1(2)= p1(2)-p1(4);
p2(4)=p2(4)*1.7; p2(2)= p2(2)-p1(4);
p3(4)=p3(4)*1.7; p3(2)= p3(2)-p1(4);
set(st.vols{i}.ax{1}.ax,'Position',...
[0 h-p1(4) p1(3) p1(4)]);
set(st.vols{i}.ax{2}.ax,'Position',...
[p1(3)+0.005 h-p2(4) p2(3) p2(4)]);
set(st.vols{i}.ax{3}.ax,'Position',....
[p1(3)+p2(3)+0.01 h-p3(4) p3(3) p3(4)]);
h = h - p1(4)-0.005;
end
Thanks a lot for your advices!
Vladimir
--- On Tue, 2/22/11, Guillaume Flandin <[log in to unmask]> wrote:
> From: Guillaume Flandin <[log in to unmask]>
> Subject: Re: [SPM] Check Reg Figures SPM8 - size and arrangement
> To: "Vladimir Bogdanov" <[log in to unmask]>
> Date: Tuesday, February 22, 2011, 4:49 PM
> Dear Vladimir,
>
> the following code should get you started (to be executed
> when images
> are displayed with checkreg):
>
> global st
> h = 1;
> for i=1:nnz(~cellfun('isempty',st.vols))
> p1 = get(st.vols{i}.ax{1}.ax,'Position');
> p2 = get(st.vols{i}.ax{2}.ax,'Position');
> p3 = get(st.vols{i}.ax{3}.ax,'Position');
> l = p1(3) + p2(3) + p3(3); sc =
> (1-0.01)/l;
> p1 = p1*sc; p2 = p2 * sc; p3 = p3 * sc;
> set(st.vols{i}.ax{1}.ax,'Position',...
> [0 h-p1(4) p1(3) p1(4)]);
> set(st.vols{i}.ax{2}.ax,'Position',...
> [p1(3)+0.005 h-p2(4) p2(3)
> p2(4)]);
> set(st.vols{i}.ax{3}.ax,'Position',....
> [p1(3)+p2(3)+0.01 h-p3(4) p3(3)
> p3(4)]);
> h = h - p1(4)-0.005;
> end
>
> Best,
> Guillaume.
>
> On 22/02/11 14:58, Vladimir Bogdanov wrote:
> > Dear John,
> >
> > Thank you for your response! Where is the part of the
> code responsible for this located? The SPM script is huge
> and I am only a beginner. :)
> >
> > Sincerely yours,
> > Vladimir
> >
> >
> > --- On Tue, 2/22/11, John Ashburner <[log in to unmask]>
> wrote:
> >
> >> From: John Ashburner <[log in to unmask]>
> >> Subject: Re: [SPM] Check Reg Figures SPM8 - size
> and arrangement
> >> To: [log in to unmask]
> >> Date: Tuesday, February 22, 2011, 3:39 PM
> >> There are no default settings that
> >> could be changed to make SPM do
> >> what you would like it to do. However, the
> beauty of
> >> having SPM in
> >> MATLAB is that it is relatively easy to tweak the
> code to
> >> make it do
> >> exactly what you want.
> >>
> >> Best regards,
> >> -John
> >>
> >> On 20 February 2011 22:20, Vladimir Bogdanov
> <[log in to unmask]>
> >> wrote:
> >>> Dear SPM experts,
> >>>
> >>> By default the size of the images in Check Reg
> figure
> >> does not allow to see well anatomical details (see
> screen1
> >> in attachment). This can be changed manually
> (screen2), but
> >> those changes take time.
> >>>
> >>> Is there a simple way do it fast? Is it
> possible to
> >> change SPM settings somewhere to make the figure
> in the same
> >> way (different from default) every time we call
> Check Reg?
> >>>
> >>> Thank you in advance for your help,
> >>> Vladimir
> >>>
> >>> Volodymyr Bogdanov, PhD
> >>>
> >>> Headache Research Unit
> >>> GIGA - Neurosciences
> >>> University of Liege
> >>> CHU T4 +1, Sart Tilman
> >>> Av de l'Hôpital 1
> >>> 4000 Liege, Belgium
> >>>
> >>>
> >>>
> >>
> >
> >
> >
> >
> >
>
>
> --
> Guillaume Flandin, PhD
> Wellcome Trust Centre for Neuroimaging
> University College London
> 12 Queen Square
> London WC1N 3BG
>
|