Print

Print


I think a solution to this problem would be great for people working in shared environments!

Best
Torben


Torben Ellegaard Lund
Associate Professor, PhD
The Danish National Research Foundation's Center of Functionally Integrative Neuroscience (CFIN)
Aarhus University
Aarhus University Hospital
Building 10G, 5th floor, room 31
Noerrebrogade 44
8000 Aarhus C
Denmark
Phone: +4589494380
Fax: +4589494400
http://www.cfin.au.dk
[log in to unmask]

Den Uge:32 10/08/2011 kl. 01.38 skrev Paul McIntosh:

> Hi All,
> 
> I am configuring SPM to work in a shared environment and I am getting a lot of requests for SPM versions and also SPM toolboxes (and versions). Currently SPM looks in one location for toolboxes and this makes managing things quite difficult.
> 
> I am considering updating the spm.m code below to not only look in the immediate directory but also parse a "MATLABSPMPATH" environment variable. That way a variety of toolboxes locations could be set in the MATLABSPMPATH and hopefully SPM will recognise both local and independant toolboxes.
> 
> 1) Is this something the SPM community would like? I can share the results if so
> 
> 2) Is there something deeply flawed in this approach? e.g. is the directory location hardcoded elsewhere or needed by the toolboxes themselves?
> 
> 
> % Toolbox directory
> %-----------------------------------------------------------------------
> 
> Tdir = fullfile(spm('Dir'),'toolbox');
> 
> 
> %-List of potential installed toolboxes directories
> %-----------------------------------------------------------------------
> 
> if exist(Tdir,'dir')
> d = dir(Tdir);
> d = {d([d.isdir]).name};
> d = {d{cellfun('isempty',regexp(d,'^\.'))}};
> else
> d = {};
> end
> 
> Cheers,
> 
> Paul
> -- 
> Dr Paul McIntosh
>  Senior Visualisation Analyst/MOSP Project Leader
>    Multi-modal Australian ScienceS Imaging and Visualisation Environment (www.massive.org.au)
> Ph: 9902 0439 Mob: 0434 524935
> Victorian Partnership for Advanced Computing 
> www.vpac.org - Innovation powered by Advanced Computing