Commit a0c8ac73 authored by Lukas Aspöck's avatar Lukas Aspöck

- corrected raven base path for demo file

- fixed bug of readRavenMaterial in case preventing crash when reading short named material files
parent f51fb010
......@@ -13,8 +13,9 @@ ravenProjectPath = '..\RavenInput\Classroom\Classroom.rpf';
if (~exist(ravenProjectPath,'file'))
[filename, pathname] = uigetfile('Classroom.rpf', 'Please select raven project file!');
ravenProjectPath = [pathname filename];
ravenBasePath = ravenProjectPath(1:end-34);
end
ravenBasePath = ravenProjectPath(1:end-34);
rpf = itaRavenProject(ravenProjectPath);
%% Simulationsparameter einstellen
% Image sources up to second order
......
function [absorp, scatter] = readRavenMaterial(materialName, pathToMaterials)
% <ITA-Toolbox>
% This file is part of the application Raven for the ITA-Toolbox. All rights reserved.
% You can find the license for this m-file in the application folder.
% </ITA-Toolbox>
% <ITA-Toolbox>
% This file is part of the application Raven for the ITA-Toolbox. All rights reserved.
% You can find the license for this m-file in the application folder.
% </ITA-Toolbox>
if nargin < 2
pathToMaterials = '..\RavenDatabase\MaterialDatabase';
end
end
if isequal(materialName(end-4:end), '.mat')
materialName = materialName(1:end-4);
if (length(materialName) > 4)
if isequal(materialName(end-4:end), '.mat')
materialName = materialName(1:end-4);
end
end
ini = IniConfig();
ini = IniConfig();
ini.ReadFile(fullfile(pathToMaterials, [materialName '.mat']));
absorp = ini.GetValues('Material', 'absorp');
if nargout > 1
scatter = ini.GetValues('Material', 'scatter');
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment