matRad script %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Copyright 2015 the matRad development team. This file is part of the matRad project. It is subject to the license terms in the LICENSE file found in the top-level directory of this distribution and at https://github.com/e0404/matRad/LICENSES.txt. No part of the matRad project, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE file. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 % matRad script 0002 % 0003 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0004 % 0005 % Copyright 2015 the matRad development team. 0006 % 0007 % This file is part of the matRad project. It is subject to the license 0008 % terms in the LICENSE file found in the top-level directory of this 0009 % distribution and at https://github.com/e0404/matRad/LICENSES.txt. No part 0010 % of the matRad project, including this file, may be copied, modified, 0011 % propagated, or distributed except according to the terms contained in the 0012 % LICENSE file. 0013 % 0014 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0015 0016 matRad_rc 0017 0018 % load patient data, i.e. ct, voi, cst 0019 0020 %load HEAD_AND_NECK 0021 load TG119.mat 0022 %load PROSTATE.mat 0023 %load LIVER.mat 0024 %load BOXPHANTOM.mat 0025 0026 % meta information for treatment plan 0027 0028 pln.radiationMode = 'photons'; % either photons / protons / carbon 0029 pln.machine = 'Generic'; 0030 0031 pln.numOfFractions = 30; 0032 0033 % beam geometry settings 0034 pln.propStf.bixelWidth = 5; % [mm] / also corresponds to lateral spot spacing for particles 0035 pln.propStf.gantryAngles = [0:72:359]; % [?] 0036 pln.propStf.couchAngles = [0 0 0 0 0]; % [?] 0037 pln.propStf.numOfBeams = numel(pln.propStf.gantryAngles); 0038 pln.propStf.isoCenter = ones(pln.propStf.numOfBeams,1) * matRad_getIsoCenter(cst,ct,0); 0039 0040 % dose calculation settings 0041 pln.propDoseCalc.doseGrid.resolution.x = 5; % [mm] 0042 pln.propDoseCalc.doseGrid.resolution.y = 5; % [mm] 0043 pln.propDoseCalc.doseGrid.resolution.z = 5; % [mm] 0044 0045 % optimization settings 0046 pln.propOpt.optimizer = 'IPOPT'; 0047 pln.propOpt.bioOptimization = 'none'; % none: physical optimization; const_RBExD; constant RBE of 1.1; 0048 % LEMIV_effect: effect-based optimization; LEMIV_RBExD: optimization of RBE-weighted dose 0049 pln.propOpt.runDAO = false; % 1/true: run DAO, 0/false: don't / will be ignored for particles 0050 pln.propOpt.runSequencing = false; % 1/true: run sequencing, 0/false: don't / will be ignored for particles and also triggered by runDAO below 0051 0052 %% initial visualization and change objective function settings if desired 0053 matRadGUI 0054 0055 %% generate steering file 0056 stf = matRad_generateStf(ct,cst,pln); 0057 0058 %% dose calculation 0059 if strcmp(pln.radiationMode,'photons') 0060 dij = matRad_calcPhotonDose(ct,stf,pln,cst); 0061 %dij = matRad_calcPhotonDoseVmc(ct,stf,pln,cst); 0062 elseif strcmp(pln.radiationMode,'protons') || strcmp(pln.radiationMode,'carbon') 0063 dij = matRad_calcParticleDose(ct,stf,pln,cst); 0064 end 0065 0066 %% inverse planning for imrt 0067 resultGUI = matRad_fluenceOptimization(dij,cst,pln); 0068 0069 %% sequencing 0070 if strcmp(pln.radiationMode,'photons') && (pln.propOpt.runSequencing || pln.propOpt.runDAO) 0071 %resultGUI = matRad_xiaLeafSequencing(resultGUI,stf,dij,5); 0072 %resultGUI = matRad_engelLeafSequencing(resultGUI,stf,dij,5); 0073 resultGUI = matRad_siochiLeafSequencing(resultGUI,stf,dij,5); 0074 end 0075 0076 %% DAO 0077 if strcmp(pln.radiationMode,'photons') && pln.propOpt.runDAO 0078 resultGUI = matRad_directApertureOptimization(dij,cst,resultGUI.apertureInfo,resultGUI,pln); 0079 matRad_visApertureInfo(resultGUI.apertureInfo); 0080 end 0081 0082 %% start gui for visualization of result 0083 matRadGUI 0084 0085 %% indicator calculation and show DVH and QI 0086 [dvh,qi] = matRad_indicatorWrapper(cst,pln,resultGUI); 0087