Sorry, I my mistake.
I do it the following way:
filt = ['^', '', '.*\.img'];
P = spm_select('List', yourdirectory, filt) ;
Regards
Pieter
Jérôme Redouté schreef:
> Thanks Pieter,
> But it is exactly what I don't want to have to do.
> I want to have all these files selected automatically, because if I
> use this function in a loop in order to select files from several
> sessions/subjects, it is not really usefull if I need to select
> manually...
> Thanks again
> Jerome
>
>
> Pieter Vandemaele a écrit :
>> Hi Jêrome,
>>
>> If you click the right mouse button, you can get a context menu where
>> you can click "Select all". Of course, you first have to enter the
>> right filter. For more information, you should read the comments in
>> spm_select.m.
>> Good luck
>>
>> Pieter
>>
>> Pieter Vandemaele
>> MSc-Ing
>> Ghent Institute for Functional and Metabolic Imaging
>>
>>
>> Jérôme Redouté schreef:
>>> Dear SPMers,
>>> I try to write a short script where I need to select volumes from a
>>> 4D Niftii file.
>>> If I use the spm_select function with these parameters:
>>> spm_select([1 Inf], 'image', 'msg', '' ,'c:\MyfMRIData\','filter',
>>> '[1:400]' )
>>> I get a prompt window asking me to select manually all the 400 files
>>> that are correctly displayed in and then press Done.
>>> My question is: Is there a mean skip this interactive mode and
>>> select automatically all these files, as the 'select all' function do?
>>> I did not meet this problem with the previous spm_get function
>>> Thanks for your help
>>> Jerome
>>>
>>
|