12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- %% script to apply non-uniform prescription in IMRT dose optimization
- % prescription matrix 'PTVDosePlus.bin' and 'PTVDoseMinus.bin'
- % addpath('C:\Documents and Settings\Steve\Desktop\daveTPS\photonDoseCalc\scripts_m');
- % addpath('C:\Documents and Settings\Steve\Desktop\daveTPS\opt\linlsqUtil');
- % open prescription in sparse format matlab structure and create PTV mask
- %
- % presc.x_count (int)
- % presc.y_count (int)
- % presc.z_count (int)
- % presc.Nind (int)
- % presc.non_zero_indices (int32)
- % presc.non_zero_values (single)
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV003f\Doses\AV003f_Continuous_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV003f\Doses\AV003f_PVC_Continuous_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV003f\Doses\AV003f_Threshold_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV003f\Doses\AV003f_PVC_Threshold_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV004c\Doses\AV004c_Continuous_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV004c\Doses\AV004c_PVC_Continuous_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV004c\Doses\AV004c_Threshold_cropped.am');
- pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV004c\Doses\AV004c_PVC_Threshold_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\HN002b\Doses\HN002b_Continuous_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\HN002b\Doses\HN002b_PVC_Continuous_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\HN002b\Doses\HN002b_Threshold_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\HN002b\Doses\HN002b_PVC_Threshold_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV001c\Doses\AV001c_Continuous_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV001c\Doses\AV001c_PVC_Continuous_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV001c\Doses\AV001c_Threshold_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV001c\Doses\AV001c_PVC_Threshold_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV001f\Doses\AV001f_Continuous_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV001f\Doses\AV001f_PVC_Continuous_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV001f\Doses\AV001f_Threshold_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV001f\Doses\AV001f_PVC_Threshold_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\HN003c\Doses\HN003c_Continuous_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\HN003c\Doses\HN003c_PVC_Continuous_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\HN003c\Doses\HN003c_Threshold_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\HN003c\Doses\HN003c_PVC_Threshold_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV004f\Doses\AV004f_Continuous_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV004f\Doses\AV004f_PVC_Continuous_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV004f\Doses\AV004f_Threshold_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV004f\Doses\AV004f_PVC_Threshold_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV002f\Doses\AV002f_Continuous_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV002f\Doses\AV002f_PVC_Continuous_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV002f\Doses\AV002f_Threshold_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV002f\Doses\AV002f_PVC_Threshold_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV005c\Doses\AV005c_Continuous_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV005c\Doses\AV005c_PVC_Continuous_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV005c\Doses\AV005c_Threshold_cropped.am');
- % pet = am2geom('D:\FTP\Dose Painting\AAPM09\AV005c\Doses\AV005c_PVC_Threshold_cropped.am');
- % load('D:\FTP\Dose Painting\AAPM09\HN003c\Doses\HN003c_U01_3MM_continuous.mat');
- % load('D:\FTP\Dose Painting\AAPM09\HN003c\Doses\HN003c_U01_5MM_continuous.mat');
- % load('D:\FTP\Dose Painting\AAPM09\HN003c\Doses\HN003c_U01_7MM_continuous.mat');
- %
- % load('D:\FTP\Dose Painting\AAPM09\HN003c\Doses\HN003c_U01_3MM_SUV70_threshold.mat');
- % load('D:\FTP\Dose Painting\AAPM09\HN003c\Doses\HN003c_U01_5MM_SUV70_threshold.mat');
- % load('D:\FTP\Dose Painting\AAPM09\HN003c\Doses\HN003c_U01_7MM_SUV70_threshold.mat');
- %
- % load('D:\FTP\Dose Painting\AAPM09\HN003c\Doses\HN003c_U01_3MM_SUV40_CTV54_GTV72.mat');
- % load('D:\FTP\Dose Painting\AAPM09\HN003c\Doses\HN003c_U01_5MM_SUV40_CTV54_GTV72.mat');
- % load('D:\FTP\Dose Painting\AAPM09\HN003c\Doses\HN003c_U01_7MM_SUV40_CTV54_GTV72.mat');
- %
- % load('D:\FTP\Dose Painting\AAPM09\HN003c\Doses\HN003c_U01_5MM_SUV40_CTV54_GTV94.mat');
- % load('D:\FTP\Dose Painting\AAPM09\HN003c\Doses\HN003c_U01_7MM_SUV40_CTV54_GTV99.mat');
- % load('D:\FTP\Dose Painting\AAPM09\HN003c\Doses\HN003c_U01_5MM_SUV40_CTV54_GTV65.mat');
- load('D:\FTP\Dose Painting\AAPM09\HN003c\Doses\HN003c_U01_7MM_SUV40_CTV54_GTV63.mat');
- petSparse = sparse3D(presc);
- % petSparse = sparse3D(pet.data);
- petSparse.Nind = length(petSparse.non_zero_indices);
- % write prescription to file
-
- write_presc(petSparse,'GTV');
- fprintf('Uniform prescription sucessfully replaced with non-uniform prescription.\n');
|