function Compare_optPlans resultPath = 'C:\010-work\003_localGit\WiscPlan_v2\data\PatData_Avastin009\matlab_files\'; load([resultPath 'Geometry.mat']) roi_idx = 1; nfrac = 1; load([resultPath 'optResults_backup_Dumb.mat']) dose_WP = optResults.dose{end}; [dvh_TP dosebins_TP] = dvhist(dose_WP,Geometry,roi_idx,nfrac); [dvh_TP_head dosebins_TP_head] = dvhist(dose_WP,Geometry,2,nfrac); load([resultPath 'NLP_result_backup_Dumb.mat']) dose_NLP_1 = NLP_result.dose; [dvh_NLP_1 dosebins_NLP_1] = dvhist(dose_NLP_1,Geometry,roi_idx,nfrac); [dvh_NLP_head_1 dosebins_NLP_head_1] = dvhist(dose_NLP_1,Geometry,2,nfrac); load([resultPath 'NLP_result_backup_prob.mat']) % load([resultPath 'NLP_result.mat']) dose_NLP_2 = NLP_result.dose; [dvh_NLP_2 dosebins_NLP_2] = dvhist(dose_NLP_2,Geometry,roi_idx,nfrac); [dvh_NLP_head_2 dosebins_NLP_head_2] = dvhist(dose_NLP_2,Geometry,2,nfrac); load([resultPath 'NLP_result_backup_DP.mat']) dose_NLP_3 = NLP_result.dose; [dvh_NLP_3 dosebins_NLP_3] = dvhist(dose_NLP_3,Geometry,roi_idx,nfrac); [dvh_NLP_head_3 dosebins_NLP_head_3] = dvhist(dose_NLP_3,Geometry,2,nfrac); figure hold on % plot(dosebins_TP, dvh_TP,'Color', [0.9,0.2,0.2],'LineStyle', '--','DisplayName', Geometry.ROIS{roi_idx}.name); % plot(dosebins_NLP_1, dvh_NLP_1,'Color', [0.9,0.2,0.2],'LineStyle', '-','DisplayName', Geometry.ROIS{roi_idx}.name); % plot(dosebins_NLP_2, dvh_NLP_2,'Color', [0.9,0.2,0.2],'LineStyle', '-.','DisplayName', Geometry.ROIS{roi_idx}.name); plot(dosebins_NLP_3, dvh_NLP_3,'Color', [0.9,0.2,0.2],'LineStyle', '--','DisplayName', Geometry.ROIS{roi_idx}.name); % plot(dosebins_TP_head, dvh_TP_head,'Color', [0.2,0.9,0.2],'LineStyle', '--','DisplayName', Geometry.ROIS{roi_idx}.name); % plot(dosebins_NLP_head_1, dvh_NLP_head_1,'Color', [0.2,0.9,0.2],'LineStyle', '-','DisplayName', Geometry.ROIS{roi_idx}.name); % plot(dosebins_NLP_head_2, dvh_NLP_head_2,'Color', [0.5,0.9,0.2],'LineStyle', '-.','DisplayName', Geometry.ROIS{roi_idx}.name); plot(dosebins_NLP_head_3, dvh_NLP_head_3,'Color', [0.5,0.9,0.2],'LineStyle', '--','DisplayName', Geometry.ROIS{roi_idx}.name); hold off % legend('DP target', 'DP head') % legend('Robust target', 'Robust head') % legend('Prob. target', 'DP target', 'Prob. head', 'DP head') % legend('TP target', 'Robust target', 'TP head', 'Robust head') % legend('Robust target', 'Prob. target', 'Robust head', 'Prob. head') legend('Prob. target', 'DP target', 'Prob. head', 'DP head') axis([0 100 0 100]) xlabel('Dose', 'Color','w') ylabel('Volume', 'Color','w') end % set(gca,'Color','k') % plot background black % whitebg('k')