Skip to content

A Julia package for medical physics. The goal is to provide a flexible software package that allows quick prototyping for algorithms in proton therapy. Currently just a mirror of the Zenodo repoitory. https://zenodo.org/doi/10.5281/zenodo.10377184

License

Notifications You must be signed in to change notification settings

renatobellotti/Juliana.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Implementation of a spot (and later probably beam angle) optimiser in Julia.

Installation

  1. Get access to the repo.
  2. Clone the repo:
    git clone [email protected]:bellotti_r/differentiable-planning.git
  3. Install Julia using the official instructions. You need to install version 1.8: juliaup add 1.8.
  4. Open a Julia command line from within the JulianA repo by typing julia +1.8 in a terminal. Then type the following and hit enter to setup a development version of the Juliana package (i. e. local edits to the files will be visible when you import the package in a fresh session). The following command will download all dependencies and setup the package for local development. The bracket ] command will switch to the package manager mode of the Julia REPL, which makes it easier to deal with packages and environments.
    ] dev .
  5. Test your installation in a Julia REPL. The first import will precompile Juliana, so please be a bit patient.
    using Juliana
  6. (Optional) Install a Jupyter kernel for Julia. Open a Julia REPL in the repo directory, then type the following:
    using Pkg
    Pkg.add("IJulia")
    using IJulia
    notebook()
    The notebook() command will start a local Jupyter server and open a browser so you can start editing. The first two lines are needed only once for the installation of Jupyter itself.

Building documentation

julia docs/make.jl

TPS integration

This package is built such that it can support any TPS, in principle. To add a TPS, you have to create a type, e. g. TpsType, that is a subtype to Juliana.AbstractTps and implement the following methods for this type:

place_spots(tps::TpsType,
            ct::ScalarGrid,
            target_structure::Structure,
            preabsorber::String,
            gantry_angles,
            couch_angles,
            nozzle_extractions)

calculate_dose(tps::TpsType,
               resolution::Real,
               ct::ScalarGrid,
               plan::TreatmentPlan)

calculate_Dij_matrix(tps::TpsType,
                     ct::ScalarGrid,
                     plan::TreatmentPlan,
                     optimisation_points)

Currently implemented TPS:

  • Fiona standalone
    Needs proprietary files. A path to these files is given to the constructor. Two paths are needed: To a directory that contains all the machine parameters and to the JAR file that contains the actual code of Fiona standalone.

Test coverage

You can get an overview over test coverage by running the following command from within the project root directory:

julia --project -E 'using LocalCoverage; coverage = generate_coverage("Juliana"; run_test = true)'

About

A Julia package for medical physics. The goal is to provide a flexible software package that allows quick prototyping for algorithms in proton therapy. Currently just a mirror of the Zenodo repoitory. https://zenodo.org/doi/10.5281/zenodo.10377184

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published