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:
Clone the repository from GitHub:
Create a new branch
git checkout -b my-example
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
Commit your changes
git add examples/community/CommunityExample/my_example.py git commit -m "Add community example: my_example"
Push your branch to GitHub
git push origin my-example
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