Compare_optPlans.m 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. function Compare_optPlans
  2. resultPath = 'C:\010-work\003_localGit\WiscPlan_v2\data\PatData_Avastin009\matlab_files\';
  3. load([resultPath 'Geometry.mat'])
  4. roi_idx = 1;
  5. nfrac = 1;
  6. load([resultPath 'optResults_backup_Dumb.mat'])
  7. dose_WP = optResults.dose{end};
  8. [dvh_TP dosebins_TP] = dvhist(dose_WP,Geometry,roi_idx,nfrac);
  9. [dvh_TP_head dosebins_TP_head] = dvhist(dose_WP,Geometry,2,nfrac);
  10. load([resultPath 'NLP_result_backup_Dumb.mat'])
  11. dose_NLP_1 = NLP_result.dose;
  12. [dvh_NLP_1 dosebins_NLP_1] = dvhist(dose_NLP_1,Geometry,roi_idx,nfrac);
  13. [dvh_NLP_head_1 dosebins_NLP_head_1] = dvhist(dose_NLP_1,Geometry,2,nfrac);
  14. load([resultPath 'NLP_result_backup_prob.mat'])
  15. % load([resultPath 'NLP_result.mat'])
  16. dose_NLP_2 = NLP_result.dose;
  17. [dvh_NLP_2 dosebins_NLP_2] = dvhist(dose_NLP_2,Geometry,roi_idx,nfrac);
  18. [dvh_NLP_head_2 dosebins_NLP_head_2] = dvhist(dose_NLP_2,Geometry,2,nfrac);
  19. load([resultPath 'NLP_result_backup_DP.mat'])
  20. dose_NLP_3 = NLP_result.dose;
  21. [dvh_NLP_3 dosebins_NLP_3] = dvhist(dose_NLP_3,Geometry,roi_idx,nfrac);
  22. [dvh_NLP_head_3 dosebins_NLP_head_3] = dvhist(dose_NLP_3,Geometry,2,nfrac);
  23. figure
  24. hold on
  25. % plot(dosebins_TP, dvh_TP,'Color', [0.9,0.2,0.2],'LineStyle', '--','DisplayName', Geometry.ROIS{roi_idx}.name);
  26. % plot(dosebins_NLP_1, dvh_NLP_1,'Color', [0.9,0.2,0.2],'LineStyle', '-','DisplayName', Geometry.ROIS{roi_idx}.name);
  27. % plot(dosebins_NLP_2, dvh_NLP_2,'Color', [0.9,0.2,0.2],'LineStyle', '-.','DisplayName', Geometry.ROIS{roi_idx}.name);
  28. plot(dosebins_NLP_3, dvh_NLP_3,'Color', [0.9,0.2,0.2],'LineStyle', '--','DisplayName', Geometry.ROIS{roi_idx}.name);
  29. % plot(dosebins_TP_head, dvh_TP_head,'Color', [0.2,0.9,0.2],'LineStyle', '--','DisplayName', Geometry.ROIS{roi_idx}.name);
  30. % plot(dosebins_NLP_head_1, dvh_NLP_head_1,'Color', [0.2,0.9,0.2],'LineStyle', '-','DisplayName', Geometry.ROIS{roi_idx}.name);
  31. % plot(dosebins_NLP_head_2, dvh_NLP_head_2,'Color', [0.5,0.9,0.2],'LineStyle', '-.','DisplayName', Geometry.ROIS{roi_idx}.name);
  32. plot(dosebins_NLP_head_3, dvh_NLP_head_3,'Color', [0.5,0.9,0.2],'LineStyle', '--','DisplayName', Geometry.ROIS{roi_idx}.name);
  33. hold off
  34. % legend('DP target', 'DP head')
  35. % legend('Robust target', 'Robust head')
  36. % legend('Prob. target', 'DP target', 'Prob. head', 'DP head')
  37. % legend('TP target', 'Robust target', 'TP head', 'Robust head')
  38. % legend('Robust target', 'Prob. target', 'Robust head', 'Prob. head')
  39. legend('Prob. target', 'DP target', 'Prob. head', 'DP head')
  40. axis([0 100 0 100])
  41. xlabel('Dose', 'Color','w')
  42. ylabel('Volume', 'Color','w')
  43. end
  44. % set(gca,'Color','k') % plot background black
  45. % whitebg('k')