Community Examples

Community Examples#

This gallery contains contributions from the OpenTPS community. It is a place to share small scripts that may help others.

Quick start: Clone → Create a branch → Add your script → Open a Pull Request

How to Contribute#

Follow these steps to contribute an example to the gallery:

  1. Clone the repository from GitHub:

  2. Create a new branch

    git checkout -b my-example
    
  3. Add your example script

    • Place your file in: examples/community/CommunityExample/

    • Use a clear, descriptive file name.

    • Start the file with a short docstring explaining what it does.

    • You can copy and adapt the template: examples/community/Template/template.py

  4. Commit your changes

    git add examples/community/CommunityExample/my_example.py
    git commit -m "Add community example: my_example"
    
  5. Push your branch to GitHub

    git push origin my-example
    
  6. Open a Pull Request

    • Go to GitHub and open a Pull Request from your branch into main.

    • Maintainers will review your code.

    • Once approved, your example will appear in the Community Gallery.

Community Examples#

Simple dose computation and optimization on a real CT image

Simple dose computation and optimization on a real CT image

Template#

Template Example

Template Example

Gallery generated by Sphinx-Gallery