Thanks Chris & Guillaume.
I was able to get this working for up to 50 images at a time. I'll be
using this just for a fast check for all images since detailed images are
not shown very well unless I go below 20 in the big monitor. Anyhow, I had
to modify some spm files such as spm_orthviews, spm_figure,
spm_check_registration to get it working and actually I created a toolbox
for it.
I hope this helps anybody else who wants to do it!
Thanks to all again,
Rodrigo
Rodrigo Dennis Perea
Graduate Research Assistant
[log in to unmask]
Bioengineering Program
Alzheimer's Research Center
The University of Kansas
On 3/26/13 10:18 AM, "Guillaume Flandin" <[log in to unmask]> wrote:
>spm8> grep 24 spm_orthviews.m
> handles = 1:24;
> handles = 1:24;
> handles = 1:24;
>h = valid_handles(1:24);
>for i=valid_handles(1:24),
>my_delete(1:24);
>for i=valid_handles(1:24)
>for i=valid_handles(1:24)
> current_handle = valid_handles(1:24);
>for i=valid_handles(1:24),
>redraw(1:24);
> img = histeq([imgt1(:); imgc1(:); imgs1(:)],1024);
> img = histeq([imgt1(:).^2; imgc1(:).^2;
>imgs1(:).^2],1024);
> img = histeq([imgt1(:); imgc1(:); imgs1(:)],1024);
>for i=valid_handles(1:24),
> handles = handles(handles<=24 & handles>=1 & ~rem(handles,1));
>st.vols = cell(24,1);
> for k = valid_handles(1:24),
> cm_handles = valid_handles(1:24);
> cm_handles = valid_handles(1:24);
> cm_handles = valid_handles(1:24);
> cm_handles = valid_handles(1:24);
> cm_handles = valid_handles(1:24);
> cm_handles = valid_handles(1:24);
> cm_handles = valid_handles(1:24);
>for i = 1:numel(valid_handles(1:24)),
>for i=valid_handles(1:24),
>
>
>and in particular, l. 1461-1465 of spm_orthviews.m:
>global st
>fig = spm_figure('FindWin','Graphics');
>bb = []; %[ [-78 78]' [-112 76]' [-50 85]' ];
>st = struct('n', 0, 'vols',[], 'bb',bb,'Space',eye(4),'centre',[0 0
>0],'callback',';','xhairs',1,'hld',1,'fig',fig,'mode',1,'plugins',{{}},'sn
>ap',[]);
>st.vols = cell(24,1);
>
>
>
>On 26/03/13 14:31, Rodrigo Perea wrote:
>> Great I'll give it a try todayİbut as far as I understood debugging the
>> code, the 24 struct array is a global array that has been created as st.
>> (If I type "global st" in the matlab command, I'll get a st structure
>>with
>> 24 vols in st.vols. Am I missing something? There is no explicit 24
>> designation in spm_orthviews
>>
>>
>> Rodrigo Dennis Perea
>> Graduate Research Assistant
>> [log in to unmask]
>> Bioengineering Program
>> Alzheimer's Research Center
>> The University of Kansas
>>
>>
>>
>>
>>
>> On 3/26/13 9:12 AM, "Guillaume Flandin" <[log in to unmask]> wrote:
>>
>>> Hi Rodrigo,
>>>
>>> you have to change spm_orthviews.m to replace all mentions of '24' to a
>>> larger value. Attached are versions of spm_check_registration.m and
>>> spm_orthviews.m from SPM12 (that, I think, should still be compatible
>>> with SPM8) where you only have to edit them once (at the very end for
>>> spm_orthviews.m).
>>> If it gets too crowded with many images, you can manually resize the
>>>SPM
>>> Graphics window and adjust the placement algorithm in
>>> spm_check_registration.m to fit with the new layout.
>>>
>>> Best,
>>> Guillaume.
>>>
>>> On 26/03/13 14:06, Rodrigo Perea wrote:
>>>> Guillaume,
>>>> Thanks for your reply. I got it working for 24 but I want some number
>>>> around 50. Apparently I have to change the global variable st. Can I
>>>>do
>>>> so? If so, where is it defined?
>>>>
>>>>
>>>> Sent from Samsung Mobile
>>>>
>>>>
>>>>
>>>> -------- Original message --------
>>>> From: Guillaume Flandin <[log in to unmask]>
>>>> Date: 03/26/2013 6:22 AM (GMT-06:00)
>>>> To: Rodrigo Perea <[log in to unmask]>
>>>> Subject: Re: [SPM] Increase check reg number 15+/15+ instead of
>>>>15/15???
>>>>
>>>>
>>>> Hi Rodrigo,
>>>>
>>>> you can edit spm_check_registration and change l.19:
>>>> [images, sts] = spm_select([1 15],'image','Select images');
>>>> In SPM12, the default is now 24. If you want to go beyond that, you
>>>>will
>>>> have to edit spm_orthviews.m as well, as the maximum value of 24 is
>>>> hardcoded a number of times.
>>>> If you have a very large number of images, there is also a little
>>>> facility in SPM12 (a 'browser' plugin accessible from the contextual
>>>> menu) that allows you to scroll through a large number of images.
>>>>
>>>> Best regards,
>>>> Guillaume.
>>>>
>>>>
>>>> On 25/03/13 20:21, Rodrigo Perea wrote:
>>>>> I have a 27'' display so I was wondering if I can increase the number
>>>>> of the images at a time instead of getting 15 only, something like 30
>>>>> at a time or more. Could anybody specify the spm script I need to
>>>>> change for this to work?
>>>>>
>>>>> Thanks in advance,
>>>>> Rodrigo
>>>>>
>>>>
>>>> --
>>>> Guillaume Flandin, PhD
>>>> Wellcome Trust Centre for Neuroimaging
>>>> University College London
>>>> 12 Queen Square
>>>> London WC1N 3BG
>>>>
>>>
>>> --
>>> Guillaume Flandin, PhD
>>> Wellcome Trust Centre for Neuroimaging
>>> University College London
>>> 12 Queen Square
>>> London WC1N 3BG
>>
>>
>
>--
>Guillaume Flandin, PhD
>Wellcome Trust Centre for Neuroimaging
>University College London
>12 Queen Square
>London WC1N 3BG
>
|