Skip to content
Snippets Groups Projects
Commit ceb4e8d0 authored by Nicola Vigano's avatar Nicola Vigano
Browse files

Added option to make id19's functions optional


Signed-off-by: default avatarNicola Vigano <nicola.vigano@esrf.fr>

git-svn-id: https://svn.code.sf.net/p/dct/code/trunk@741 4c865b51-4357-4376-afb4-474e03ccb993
parent 222c1001
No related branches found
No related tags found
No related merge requests found
initialise_gt.m 100644 → 100755
function initialise_gt()
function initialise_gt(ignore_id19)
% INITIALISE.M for Matlab installations on Windows, Macs, and Linux
% in process of being modified - Greg & Wolfgang, August 2005
%
......@@ -16,6 +16,10 @@ function initialise_gt()
% 2011-2012, Modified and improved by Nicola Vigano', vigano@esrf.fr
% 2012, Modified and improved by Yoann Guilhem, guilhem@esrf.fr
if (~exist('ignore_id19', 'var'))
ignore_id19 = false;
end
pathstruct={... % Tools from ID19's legacy code
{'/' },...
{'/art' },... % Algebraic reconstruction attempts
......@@ -38,23 +42,25 @@ function initialise_gt()
% No multi platform support, at the moment.
disp(['Machine is: ', computer])
deprecated_id19_paths = fullfile('/data','id19','archive','matlab');
if (~ignore_id19)
deprecated_id19_paths = fullfile('/data','id19','archive','matlab');
% Linux machines
if (~exist(deprecated_id19_paths, 'dir'))
error(['ERROR: No folder called: "' deprecated_id19_paths '"'])
end
% Linux machines
if (~exist(deprecated_id19_paths, 'dir'))
error(['ERROR: No folder called: "' deprecated_id19_paths '"'])
end
% Adding paths
for n = 1:length(pathstruct)
switch size(pathstruct{n}, 2)
case 1
addpath(fullfile(deprecated_id19_paths, pathstruct{n}{1}))
case 2
addpath(fullfile(deprecated_id19_paths, pathstruct{n}{1}), pathstruct{n}{2})
otherwise
disp(['Wrong parameters number for entry "', n, '"(', pathstruct{n}{1} ,') of structure "pathstruct"'])
addpath(fullfile(deprecated_id19_paths, pathstruct{n}{1}))
% Adding paths
for n = 1:length(pathstruct)
switch size(pathstruct{n}, 2)
case 1
addpath(fullfile(deprecated_id19_paths, pathstruct{n}{1}))
case 2
addpath(fullfile(deprecated_id19_paths, pathstruct{n}{1}), pathstruct{n}{2})
otherwise
disp(['Wrong parameters number for entry "', n, '"(', pathstruct{n}{1} ,') of structure "pathstruct"'])
addpath(fullfile(deprecated_id19_paths, pathstruct{n}{1}))
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment