There is a builtin callback spm_select('ExtList',...) which should
return the full pathname.
Volkmar
Quoting Jan Gläscher <[log in to unmask]>:
> If you want to retrieve the full pathname you can use the attached little
> wrapper script (spm_lselect.m)
>
> Cheers,
> Jan
>
> zewang wrote:
>> Try this.
>> Ptmp=spm_select('List', pathname, ['^' subj_dir{i},
>> 'beta_',sprintf('%4.4i',n)
>> ,'\w*\.img$']);
>> Note the list you get only contains the filename, you should add the full
>> path if you want to load them in a different path.
>>
>>
>> ---------------------------------------------
>> Ze Wang, Ph. D
>> Center for functional neuroimaging,
>> Dept of Neurology,
>> Medicine school,
>> University of Pennsylvania
>> 3400 Spruce Stree,
>> 3W Gates building,
>> Philadelphia, PA 19104
>> Tel: 215-662-7341
>>
>>
>> -----Original Message-----
>> From: SPM (Statistical Parametric Mapping) [mailto:[log in to unmask]] On
>> Behalf Of Struiksma, M. (Marijn)
>> Sent: Tuesday, March 04, 2008 9:57 AM
>> To: [log in to unmask]
>> Subject: [SPM] using spm_select in a script
>>
>> Dear SPM'ers,
>>
>> I am writing a script to compute average parameter estimates in an ROI.
>> In order to do that I need to select the appropriate beta-files. I have
>> used the spm_select function as follows:
>>
>> betaFile=spm_select(1,'image','',[subj_dir{i},'beta_',sprintf('%4.4i',n)
>> ,'.img ']);
>>
>> This works fine, but I still have to press done each time a file is
>> selected. Is there a way to avoid the clicking? There are a few hundred
>> beta-files that need to be selected and I don't want to click a few
>> hundred times.
>>
>> Thanx!
>>
>> Marijn
>>
>
> --
> Jan Gläscher, Ph.D. Div. Humanities & Social Sciences
> +1 (626) 395-3898 (office) Caltech, Broad Center, M/C 114-96
> +1 (626) 395-2000 (fax) 1200 California Blvd
> [log in to unmask] Pasadena, CA 91125
>
|