Skip to content

Conversation

@remocristoforetti
Copy link
Contributor

BP.setBiologicalDosePrescription called in optimizationProblem converts now the single fraction dose in single fraction effect, which is then scaled up to total effect prescription. This is only active for effect optimization,

Noa Homolka and others added 30 commits December 5, 2021 18:59
Major updates:
1. installTOPAS script which installs TOPAS with the dependencies from downloaded topas.tar.gz
2. modular Schneider Converter: Converter is now generated on demand rather than read from file which allows a variety of different options
3. modular TOPAS scorer which can be individually turned on and off
4. added 4D accumulation in calcDoseDirectMC
5. implemented dij calculation in TOPAS

Minor updates:
1. Added optional initial weights to fluence Optimization
2. enabled helium in calcdoseDirect
3. implemented std of physicalDose
4. export feature for TOPAS to run externally (includes functions to read from external folders)
5. restructured resampling in calcParticleDoseMCtopas in separate function
6. MCemmittanceBaseData can calculate meanEnergy and spread also for carbon and helium ions

Bug fixes and minor changes:
1. added flag in stf to catch specific error where no energies could be found
2. Fixed bug in resizeCstToGrid function
3. Fixed a number of errors in 4D calculation workflow
…to pr/536

# Conflicts:
#	MatRad_Config.m
#	matRad_calcParticleDose.m
#	matRad_fluenceOptimization.m
MAJOR UPDATES:
- Added support functions for TOPAS into topasConfig class which makes usage more streamlined and uniform
- Added support functions for MCsquare into MCsquareConfig class
- Added class constructor for pln in MatRad_config
- Added comments to whole TOPAS pipeline
- edited calcParticleDoseMCtopas to generate dij in matRad format and changed calcCubes to accept a variety of differnet fields, without changing the current usage

- minor rearrangement and whitespace changes to scorer files in TOPAS
- minor rearrangement and whitespace changes to MCsquare scanner files
- added multiple RBE scorer support for TOPAS
- Changed readBinData/readCsvData files to be universally usable in matRad
- Added functions to load class parameters and regular parameters to pln
- edited and refined installTOPAS script
- fixed minor bugs
- Renamed numHistories back to Num_Primaries for MCsquare, since it's needed for automatic writing of the config file
- added defaultHistories parameter in MatRad_config (Monte Carlo parameter will be overwritten if this is set)
- added matRad_cfg to subfunctions to avoid potential matlab bug
- renamed Monte Carlo default engines to class names
- Updated Range-Energy relationship for Helium and carbon ions
- Added postprocessing for MCsquare dij calculation
- added proper flag check for external calculation
- Removed beamNum calculation in calcDoseDirectMC, this is already done in dij calculation functions
Merge remote-tracking branch 'pamede/dev_MonteCarloRestructured' into dev_varRBErobOpt_Update
Updated Example 13:
- added function to plot particleBaseDataEntry
- edited function to fit base data
- added function to generate a single pencil beam

Minor changes:
- added variable in pln to contain an existing BDL file if available
- Throws info where base data file is saved
- renamed MCsquare property "Num_Primaries" -> "numHistories" to be in line with other Monte Carlo (this is written to the BDL file in original format)
- added comments
RIP contains, you were the love of my life.
- Rearranged materials into materialConverter folder
- Renamed density correction files
- Removed density correction that was essentially unusable and had no reference
- Added readme to density correction
Added ChangeLog for MonteCarlo workflow Updates in Pull Request
# Conflicts:
#	MatRad_Config.m
#	matRad_calcCubes.m
#	matRad_calcParticleDose.m
#	matRad_fluenceOptimization.m
#	matRad_generateStf.m
small bug fix that should also resolve this iteration of unit testing
Update PR:
- removed TOPAS scripts
- added compatibility patch
- Added patch for fluence Optimization and input of precalculated weigths
- Added input of LET into calcLQParameter function
- Moved resampling function from TOPASconfig in general tools
- made externalCalculation parameter clearer to use and saved folder is output to the console
-
- fixed resampleCTtoGrid function being called incorrectly
- fixed input
- renamed topasCubes variable into dij to make it clearer (used to be a relict from deprecated workflow)
- Brought dij generation of MCsquare and TOPAS in line for calcDoseDirect (all beam/ray/bixel fields are 1)
- removed section that added "non-processed MC tallies", not needed anymore
- removed 2 lines from MCsquare calculation that still referenced the outdated MC_tallies system
 Important branch Bug Fix:

    - fixed 2 major bugs in matRad_calcCubes!
    - fixed bug in TopasConfig, where the empty preallocated dij field was used to calculate tallies instead of the actual dose
    - made beamSetup more concise with shorter spaces between numbers
    - added fix for selection of focusIndex for generated phaseSpace data
    - changed handling of 0 fields
    - use isprop instead of isfield now that the class system is used
    - removed several statements that are no longer used or required
# Conflicts:
#	README.md
- added output of numOfBixels that did not meet the minimum numOfParticles required
- removed unnecessary statement regarding alpha beta parameters
- added comment to externalCalculation
…Update

This is a preliminary implementation. Next, I will implement this properly into the updated TOPAS structure.

commit 0b82924
Author: pia.stammer <[email protected]>
Date:   Fri Oct 21 16:09:00 2022 +0200

    Added phase space source
    *need testing!*
    -load phase space from source file SIEMENS_PRIMUS_6.0_0.10_15.0x15.0 available at https://www-nds.iaea.org/phsp/photon/SIEMENS_Primus_6MV/
    -added beamProfile 'phasespace' and appropriate input file
    -no pencil beam scanning supported, only single angle/position atm
    ToDo: Check geometry, especially distances between nozzle, phase space, MLC and patient (surface/isocenter?)

commit 5ee5467
Author: Noa Homolka <[email protected]>
Date:   Fri Sep 16 17:19:28 2022 +0200

    PhotonTOPAS Update

    - export leafWidth from aperture2collimation
    - small bug with additional "end" fix in ParticleDoseMCtopas
    - added switch for uniform weights in case of ~calcDoseDirect
    - changed materialConversion to 'RSP'
    - renamed numOfLeaves and leafTimes parameters for easier understanding
    - Translated MLC so that the Nozzle lies at beginning of MLC, not centered

commit d43b80c
Author: pia.stammer <[email protected]>
Date:   Fri Sep 16 14:47:50 2022 +0200

    Reduced size of source, increased number of histories

commit 9067aa9
Author: pia.stammer <[email protected]>
Date:   Fri Sep 16 11:31:06 2022 +0200

    Add uniform source and rotate MLC

commit e7031b1
Author: Noa Homolka <[email protected]>
Date:   Fri Sep 16 10:30:36 2022 +0200

    disabled tracking of MCrun folder

commit 23b517a
Author: pia.stammer <[email protected]>
Date:   Fri Sep 16 09:57:44 2022 +0200

    Status 2nd Hackday: Some corrections, TOPAS runs through, results mediocre

commit bd68b3b
Author: pia.stammer <[email protected]>
Date:   Fri Jun 10 17:00:17 2022 +0200

    Initial commit: Added MLC shape capabilities for TOPAS
    - shapes generated by matRad_aperture2collimation are written into TOPAS config file
    - use class matRad_TopasConfigPhotons with "virtualGaussian" beam and "mlc" Multileaf collimator set-up if corresponding info exists
    - TOPAS config files for several beams, rays, leafs and shapes are created and run through
    !!Caution: Results not yet validated!!

commit c6dd0cb
Author: Niklas Wahl <[email protected]>
Date:   Fri Apr 29 09:49:26 2022 +0200

    added basic photon infrastructure

commit df91e40
Merge: e0ffefe ea37a85
Author: Niklas Wahl <[email protected]>
Date:   Wed Apr 20 16:08:04 2022 +0200

    Merge branch 'dev_varRBErobOpt' of https://github.com/e0404/matRad into dev_varRBErobOpt

    # Conflicts:
    #	MatRad_Config.m
    #	dicom/hlutLibrary/matRad_default.hlut
    #	examples/matRad_example6_protonsNoise.m
    #	matRad_calcDoseInitBeam.m
    #	matRad_calcParticleDose.m
    #	matRad_calcPhotonDose.m
    #	matRad_fluenceOptimization.m
    #	matRad_setOverlapPriorities.m
disabled ompMC for now and change default photon engine to TOPAS. This can be reverted at a later stage when this is properly implemented.
wahln and others added 14 commits May 23, 2023 18:25
…nto dev_MixMod_effect_prescription_bugFix

# Conflicts:
#	matRad_fluenceOptimizationJO.m
…slice-tries-to-access-ct-as-cell-bug

fix passes ct struct instead of ct.cubeHU to matRad_plotVoiContourSlice
Hotfix to the test pipeline on the master branch
…RBErobOpt

# Conflicts:
#	.github/workflows/tests.yml
#	MatRad_Config.m
#	matRad_fluenceOptimization.m
#	matRad_rc.m
#	ompMC/matRad_compileOmpMCInterface.m
#	optimization/optimizer/compile_ipopt_minGW_octave640.sh


if exist('loadwInit', 'var')
if loadwInit ==1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not entirely convinced this 'loadwInit' is a great way to manage stored initial weights as it could end up being quite messy in practice. i would take it out

datatype = 'double';
otherwise
error('Could not identify datatype for NRRD data');
matRad_cfg.dispError('Could not identify datatype for NRRD data');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was fixed with #607. try to merge master into your branch for this

%Only implemented for first scenario now
weightGradient = weightGradient + gProb{1};
end
gradientChecker = 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please set default flag to zero and add comments

@github-actions
Copy link

github-actions bot commented Jul 7, 2024

This PR was automatically marked as stale it has been open 30 days with no activity. Please review/update/merge this PR.

@github-actions github-actions bot added the stale Automatic label for stale issues label Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement stale Automatic label for stale issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants