The reason is that people wanted to have the same functionality as the old spm_list_files, so the ability to list the files in a directory was given to them with the spm_select('list',...) option. It was a case of giving people what they want, rather than what they need.
You could create a small MATLAB function that would do the job.
Best regards,
-John
-----Original Message-----
From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]] On Behalf Of Jan Gläscher
Sent: Thursday, December 07, 2006 6:39 PM
To: [log in to unmask]
Subject: Re: [SPM] Filtering in spm_select
Dear all,
in a similar vain, I wanted to ask why the interactive vs. the non-interactive
output of spm_select yields different results.
For instance,
spm_select(inf,'image','Select images ...')
will return a char array with the full path and the filesnames of the images,
whereas
spm_select('list','/path/to/my/images','^fimage.*\.img');
will only output the filenames.
However, for building your own list of images in a 1st level analysis, I think
one has to specify the full path and filename in SPM.xY.P. Thus, the latter
non-interactive case seems to be useless for automatic image selection.
One has
to add the path with spm_select('CPath','/path/to/my/images') and the
repmat the
string - pretty complicated and labor-intensive.
Am I missing something about the new functioning of spm_select?
Thanks a lot,
Jan
Quoting Fabio Sambataro <[log in to unmask]>:
> Hi Marko,
>
> Try
> spm_select(Inf,'image','Select Image',[],pwd,'test*')
>
> Hope this helps
>
> - Fabio
>
>
> -----Original Message-----
> From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]] On
> Behalf Of Marko Wilke
> Sent: Thursday, December 07, 2006 11:40 AM
> To: [log in to unmask]
> Subject: [SPM] Filtering in spm_select
>
> Dear All,
>
> I am really not sure if it is a bug or a feature but it seems to me that
> the filtering in spm_select is different from spm_get's behavior. For
> example, in spm2, I would enter
>
> test*.img
>
> as the filter which would give me
>
> test_1.img
> test_2.img
> test... you get the idea.
>
> In spm5, the same filter also gives me
>
> test_1.img
> test_2.img
> ...
>
> but also
>
> my_test_1.img
> my_test_2.img
> ...
>
> In other words, spm2 filtered only the beginning of the filenames, while
> spm5 filters any part of it (at least on Windows, Matlab 6.5.1). As
> naming conventions in spm still mainly rely on adding prefixes, I found
> it extremely handy to select out certain stages of processing which now
> is much more difficult.
>
> My simple (?) question is, can I restore spm_select to the 'old'
> behavior? I looked into the spm_select-code but it is way beyond me...
>
> Thanks for any hints,
> Marko
> --
> =====================================================================
> Marko Wilke (Dr.med./M.D.)
> [log in to unmask]
>
> Universitäts-Kinderklinik University Children's Hospital
> Abt. III (Neuropädiatrie) Dept. III (Pediatric neurology)
> Hoppe-Seyler-Str. 1, D - 72076 Tübingen
> Tel.: (+49) 07071 29-83416 Fax: (+49) 07071 29-5473
> =====================================================================
>
|