toolbox for robust and nonrobust impt optimization in
play

Toolbox for robust and nonrobust IMPT optimization in Matlab Bram - PowerPoint PPT Presentation

Toolbox for robust and nonrobust IMPT optimization in Matlab Bram L. Gorissen Physics research, department of radiation oncology Massachusetts General Hospital and Harvard Medical School September 17, 2015 Bram L. Gorissen Matlab toolbox for


  1. Toolbox for robust and nonrobust IMPT optimization in Matlab Bram L. Gorissen Physics research, department of radiation oncology Massachusetts General Hospital and Harvard Medical School September 17, 2015 Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 1 / 48

  2. Introduction Past two years: research on robust optimization of IMPT Created a set of harmonious Matlab scripts Useful as a whole for researchers joining the field Individual scripts may be useful for veterans too Most scripts can be used independently Downloadable from 3142.nl Easy to remember: Dutch π Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 2 / 48

  3. Matlab Toolbox Internal data format Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 3 / 48

  4. Data format Three variables encode all patient data DT Dfilter VVStruct Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 4 / 48

  5. Data format: DT The dose influence matrix D is stored as a sparse matrix smaller by an order of magnitude compared to a dense matrix for a typical IMPT case Matlab can efficiently access sparse matrices by column That means filtering on beamlets is fast and filtering by voxels is slow Since we need to access by voxel, we store D T Let f be an index vector that indicates which voxels are in an organ d = D(f,:)*x; % slow DT = D'; clear D; d = (x'*DT(:,f))'; % fast Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 5 / 48

  6. Data format: DT For Robust Optimization, DT is a cell array of filenames DT { 1 } refers to the D matrix of the nominal scenario DT { 2 } , DT { 3 } , etc, refer to D matrices of other scenarios Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 6 / 48

  7. Data format: Dfilter To know which voxels are in organ i , we use “Dfilter { i } ” Dfilter { i } is a vector whose length is the number of voxels Dfilter { i } (j) = true iff voxel j is in organ i % to compute the dose for voxels in volume i: d = (x'*DT(:,Dfilter { i } ))'; Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 7 / 48

  8. Data format: VVStruct VVStruct provides information about organs VVStruct.nVois is the number of organs VVStruct.name { i } is the name of organ i used in getObjectives and getDoseStatistics VVStruct.size { i } is the number of voxels in organ i used to compute objective values such as mean dose VVStruct.dist vector(i) is the distance from voxel i to the target structure used for the conformity objective Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 8 / 48

  9. Matlab Toolbox Importing data Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 9 / 48

  10. Defining patient information getPtMetadata.m defines meta data for data sets To add new patient, define: matlabfolder: folder with DijInfo.mat (which contains VVStruct&Dfilter), and files DT* (written by writesparse) dosegrid: voxel grid, used to export to CERR fields, pencilbeam: used to split up dose into dose per field target structure: used for the conformity objective dijfolder, structures: used for importing data from Astroid sample trampfile, num fractions: used to im-/export tramp files (treatment plans) Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 10 / 48

  11. Import opt4d files from Astroid importDfromAstroid.m imports Astroid data from meta.dijfolder: read vv.m loads structures.vv read dij.m loads *.dij (opt4d format) sparse3.mex creates DT results (DijInfo.mat and DT*.sparse) are written to meta.matlabfolder Write your own import script for other data sources There is example import CORT.m for the CORT data set Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 11 / 48

  12. Matlab Toolbox Interfacing with CERR Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 12 / 48

  13. CERR cerr 3d dose to vector / cerr dose vector to 3d: convert between a dose vector and a 3d dose cube cerr import plan: export x to CERR (full plan or per field) cerr import dose: export d to CERR cerr show plan: shows a plan from the CERR menu cerr create screenshots: creates screenshots of a series of plans, useful for comparisons cerr create plot: creates vector images of plans, useful for papers compute distance to target: calculates the distance between each voxel and a structure, used to create VVStruct.dist vector cerr get Dfilter for structure: gets the voxel indices of a CERR structure Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 13 / 48

  14. Matlab Toolbox Misc. functions Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 14 / 48

  15. Misc. functions getDoseStatistics / plotDvh / plotDvhCloud helps to assess a plan To remove small elements in a matrix or reclaim space: % remove small elements: DT = removeSmallElements( DT, threshold ); % removing part of a matrix: DT(:,not(Dfilter { 1 } )) = 0; % does not free memory DT = removeSmallElements(DT,0); % reclaims space Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 15 / 48

  16. Misc. functions To load DT/VVStruct/Dfilter for pt=1 (the meaning of ’1’ is defined in getPtMetadata): pt=1; initialize; To filter small elements or reclaim space: % remove small elements: DT = removeSmallElements( DT, threshold ); % removing part of a matrix: DT(:,not(Dfilter { 1 } )) = 0; % does not free memory DT = removeSmallElements(DT,0); % reclaims space Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 16 / 48

  17. Matlab Toolbox Defining objectives Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 17 / 48

  18. Defining objectives Core of the toolbox: optipopt functions Computes function values and derivatives of objective and constraint functions Supports all types of worst case (composite, objectivewise, voxelwise) distributionally worst case voxelwise expected value voxelwise distributionally worst case Robust Optimization currently only in objective Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 18 / 48

  19. getObjectives.m case 1 i = i+1; objectives { i } = struct( 'voi', ... 'Skin', 'type', 'maxdose', 'bound', 33 ); i = i+1; objectives { i } = struct( 'voi', ... 'CTV', 'type', 'lbmean', 'bound', 30.6 ); “case 1” defines the objectives id independent of patient id each set of objectives can be used for any patient (as long as structure names are the same) each line defines an objective or constraint constraints are also denoted as “objectives { i } ” Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 19 / 48

  20. objectives { i } i = i+1; objectives { i } = struct( 'voi', ... 'Skin', 'type', 'maxdose', 'bound', 33 ); three mandatory properties: voi: name of the structure type: name of the objective/constraint function bound: numerical value for a constraint, ’objective’ for an objective Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 20 / 48

  21. objective/constraint functions mean underdose / mean overdose � i max { 0 , d i − p i } / | I | parameter p i is encoded in ’dose’ field: objectives { i } = struct( ..., ’dose’, 10 ); mean squared underdose / mean squared overdose i max { 0 , d i − p i } 2 / | I | � parameter p i is encoded in ’dose’ field uniform i ( d i − p i ) 2 / | I | � parameter p i is encoded in ’dose’ field mindose/maxdose Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 21 / 48

  22. objective/constraint functions minmean/maxmean (for objectives) lbmean/ubmean (for constraints) why not specify “minmean” with a bound? that would be a bound on a minmean objective confusing: minmean bounds the dose from above sumfluence maxfluence lower CVAR / upper CVAR mean dose in hottest/coldest α % α is encoded in ’alpha’ field (range 0-100) Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 22 / 48

  23. objective/constraint functions conformity i max { 0 , d i − p i } 2 / | I | � p i is based on distance to target p i = max { 0 . 5 prescribed target dose , prescribed target dose − dist i } p i is the prescribed dose for voxels at the boundary of the target p i does not get below 50% of the prescribed dose uses the struct field ’prescribed target dose’ and VVStruct.dist vector based on all voxels (set the ’voi’ field to an arbitrary structure) useful for creating conformal plans Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 23 / 48

  24. Defining the objective To define a weighted sum objective: objectives { 1 } = struct( 'voi', 'Skin', ... 'type', 'maxdose', 'bound', 'objective' ); objectives { 2 } = struct( 'voi', 'CTV', ... 'type', 'lbmean', 'bound', 'objective' ); The optional field ’weight’ changes the relative weights (default: 1) Bram L. Gorissen Matlab toolbox for IMPT optimization September 17, 2015 24 / 48

Recommend


More recommend