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

6D-grain-reconstruction: added switch to optionally disable saving

parent bbba2734
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,8 @@ function varargout = gtReconstructGrainOrientation(grain_id, phase_id, parameter ...@@ -10,7 +10,8 @@ function varargout = gtReconstructGrainOrientation(grain_id, phase_id, parameter
'ospace_resolution', [], ... 'ospace_resolution', [], ...
'ospace_lims', [], ... 'ospace_lims', [], ...
'extra_output', false, ... 'extra_output', false, ...
'clean', true); 'clean', true, ...
'save', true );
[conf, ~] = parse_pv_pairs(conf, varargin); [conf, ~] = parse_pv_pairs(conf, varargin);
rec_opts = gtReconstruct6DGetParamenters(parameters); rec_opts = gtReconstruct6DGetParamenters(parameters);
...@@ -116,19 +117,21 @@ function varargout = gtReconstructGrainOrientation(grain_id, phase_id, parameter ...@@ -116,19 +117,21 @@ function varargout = gtReconstructGrainOrientation(grain_id, phase_id, parameter
fprintf('\b\b: Done in %g seconds.\n', toc(c)) fprintf('\b\b: Done in %g seconds.\n', toc(c))
fprintf('Saving the reconstruction file..') if (conf.save)
c = tic(); fprintf('Saving the reconstruction file..')
% Saving and cleaning at the same time c = tic();
gr_rec = struct('ODF6D', ODF6D); % Saving and cleaning at the same time
gtSaveGrainRec(phase_id, gr.id, gr_rec, ... gr_rec = struct('ODF6D', ODF6D);
'is_extended', is_extended, 'clean', conf.clean); gtSaveGrainRec(phase_id, gr.id, gr_rec, ...
fprintf('\b\b: Done in %g seconds.\n', toc(c)) 'is_extended', is_extended, 'clean', conf.clean);
fprintf('\b\b: Done in %g seconds.\n', toc(c))
end
if (nargout > 0) if (nargout > 0)
varargout{1} = ODF6D; varargout{1} = ODF6D;
end end
if (conf.extra_output) if (conf.extra_output && conf.save)
[proj_blobs, proj_spots] = algo.getProjectionOfCurrentSolution(); [proj_blobs, proj_spots] = algo.getProjectionOfCurrentSolution();
% Restoring initial volume size (depending on the rounding) % Restoring initial volume size (depending on the rounding)
......
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