function NLP_getFullDose(NLP_path, NLP_file) % this function calculates full dose matrix for Robust optimized plans % get the NLP result load([NLP_path '\' NLP_file]); path2 = NLP_path(1:end-14); D = read_ryan_beamlets([path2 '\batch_dose.bin'],'ryan sum', NLP_result.weights); % D = read_ryan_beamlets([path2 '\beamlet_batch_files\beamletbatch0.bin'],'ryan sum', NLP_result.weights); % orthoslice(D-NLP_result.dose, [0,90]) NLP_result.dose = double(D); % NLP_result.weights = double(optResults.weights{end}); save([NLP_path, NLP_file], 'NLP_result'); end