Skip to content

Commit 215184d

Browse files
committed
update
1 parent 7eb58b7 commit 215184d

File tree

8 files changed

+129
-142
lines changed

8 files changed

+129
-142
lines changed

docs/FAQ.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ from thousands of beamlets).
1616

1717
### **Can I use other open-source software for dose calculation and PortPy for planning optimization?**
1818
One of PortPy’s goals is to generate **clinically usable, deliverable plans** with dose calculations
19-
that match commercial TPS accuracy. Therefore, we currently do **not** support integrating
20-
other open-source dose engines into PortPy.
21-
22-
However, users are welcome to use other software for dose calculation and PortPy solely for
23-
optimization **if clinical-level dose accuracy is not required** for their use case.
19+
that match commercial TPS accuracy. This focus makes PortPy not only a clinically relevant platform but also a
20+
powerful research tool for benchmarking optimization algorithms and their resultant treatment plans against the
21+
clinical plans. Therefore, we currently do **not** support integrating other open-source dose engines into PortPy.
22+
However, users are welcome to use PortPy solely for planning optimization and perform dose calculations using other
23+
software, provided this setup meets the needs of their research or application.
2424

2525
---
2626

2727
### **Can I do proton therapy optimization with PortPy?**
28-
Currently, PortPy only supports **photon therapy optimization**.
28+
PortPy currently only supports **photon planning optimization**.
2929
Proton therapy support is expected to be released in 2026.
3030

3131
---

docs/contact_us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ If you prefer to communicate via email:
66
- For technical questions, contact the lead developer:
77
Gourav Jhanwar — [jhanwarg@mskcc.org](mailto:jhanwarg@mskcc.org)
88

9-
- For general inquiries, contact the PI:
9+
- For general inquiries (e.g., colaboration, tutorial for your group, licensing), contact the PI:
1010
Masoud Zarepisheh — [zarepism@mskcc.org](mailto:zarepism@mskcc.org)

docs/images/Linac_infMatrix.png

514 KB
Loading

docs/images/Visualization.png

2.75 MB
Loading

docs/index.md

Lines changed: 51 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,65 @@
11
# **What is PortPy?**
22

3-
<img src="./images/Linac.gif" align="right" alt="Radiotherapy 101" width="30%" height="30%" margin-right="10px">
3+
<img src="./images/Linac.gif" align="right" alt="Radiotherapy 101" width="40%" height="40%" margin-right="10px">
44

55
**PortPy**, short for **P**lanning and **O**ptimization for **R**adiation **T**herapy, is an open-source Python library
66
designed to advance cancer radiotherapy treatment planning optimization. Radiotherapy plays a critical role in
77
treating over half of all cancer patients, whether as a standalone treatment or in combination with surgery,
88
chemotherapy, or immunotherapy. It works by delivering high-energy radiation beams to tumors, aiming to destroy
99
cancerous cells while minimizing damage to the surrounding healthy tissues.
10-
Given that each patient has a unique anatomy, it is essential to customize the
11-
radiation beams' shape, angle, and intensity. The goal is to maximize damage to the
12-
tumor while minimizing exposure to healthy surrounding tissues. This challenge translates into modeling and
13-
solving large-scale,
14-
patient-specific mathematical optimization problems. PortPy aims to accelerate research
15-
in this interdisciplinary field by offering **tools**, **baseline algorithms**, and **benhcmark datasets**.
10+
Since every patient has a unique anatomy, the radiation beam’s shape, angle, and intensity must be carefully
11+
customized. The objective is to maximize tumor dose while minimizing exposure to nearby organs at risk—a
12+
challenge that translates into solving large-scale, patient-specific mathematical optimization problems.
1613

14+
PortPy aims to accelerate research in this interdisciplinary field by providing tools and algorithms
15+
to model and solve these complex optimization problems, as well as to visualize and quantitatively
16+
evaluate the resulting treatment plans (see image below).
1717

1818

19-
## 🚀 Main Features
19+
<img src="./images/Visualization.png" align="center" width="100%" height="70%">
20+
21+
[//]: # ()
22+
[//]: # (# 👀 What is Radiotherapy Treatment Planning Optimization?)
23+
24+
[//]: # (<img src="./images/Linac_infMatrix.png" align="center" width="100%" height="70%">)
25+
26+
[//]: # ()
27+
[//]: # (In radiotherapy, the patient lies on a couch while a )
28+
29+
[//]: # (linear accelerator rotates around them to deliver radiation &#40;Figure a&#41;. The radiation beams are shaped using )
30+
31+
[//]: # (a set of metal leaves known as a multi-leaf collimator &#40;MLC&#41;, which dynamically move in-and-out to modulate )
32+
33+
[//]: # (the beam shape. This allows radiation to be precisely targeted at the tumor from multiple directions, )
34+
35+
[//]: # (effectively placing it in the crossfire &#40;Figure b&#41;. Optimizing the angle, shape, and intensity of these )
36+
37+
[//]: # (beams for each individual patient, can be formulated as a mathematical optimization problem. )
38+
39+
[//]: # (For this, the patient's anatomy is discretized into 3D voxels and each beam is subdivided into 2D beamlets and )
40+
41+
[//]: # (the radiation dose contribution from each beamlet to each )
42+
43+
[//]: # (voxel is precomputed &#40;Figure c&#41;, and stored in a matrix commonly referred to as the dose influence matrix )
44+
45+
[//]: # (&#40;or dose deposition matrix&#41;. )
46+
47+
[//]: # ()
48+
[//]: # (PortPy provides tools to model and solve these optimization problems that are often large-scale and non-convex.)
49+
50+
[//]: # (PortPy also provides a set of tools for visual and quantitative assessment of treatment plans, including: dose distribution &#40;Figure e&#41;)
51+
52+
[//]: # (beamlet intensity maps for individual beams &#40;Figure e&#41;, dose-volume histograms &#40;DVHs, Figure f&#41;, and a color-coded table that)
53+
54+
[//]: # (compares quantitative dose metrics against clinical criteria &#40;Figure g&#41;.)
55+
56+
[//]: # ()
57+
[//]: # (<img src="./images/Visualization.png" align="center" width="90%" height="60%">)
58+
59+
[//]: # ()
60+
61+
62+
## 🚀 PortPy Main Features
2063

2164
- **IMRT/VMAT Planning Optimization (including AI):**
2265
Includes support for IMRT fluence map optimization and leaf sequencing (see [notebook](https://github.com/PortPy-Project/PortPy/blob/master/examples/1_basic_tutorial.ipynb)),
@@ -52,89 +95,5 @@ system, **ECHO**, are included for benchmarking
5295
(i.e., good but not neceassirily optimal) solution quickly for the current VMAT SCP (Sequential Convex Programming) optimization algorithm (see [notebook](https://github.com/PortPy-Project/PortPy/blob/master/examples/vmat_scp_tutorial.ipynb)).
5396
- **Enhanced visualization**: The evaluation table has been improved for better readability and analysis (see [notebook](https://github.com/PortPy-Project/PortPy/blob/master/examples/1_basic_tutorial.ipynb)).
5497

55-
[//]: # ()
56-
[//]: # (## 🚀 Key Components: Benchmark Datasets, Baseline Algorithms, and PortPy Toolkit)
57-
58-
[//]: # ()
59-
[//]: # (<img src="./images/AI_Pyramid.png" align="right" alt="Radiotherapy 101" width="50%" height="40%">)
60-
61-
[//]: # ( )
62-
[//]: # (This pyramid figure illustrates the inspiration behind developing PortPy, drawing from )
63-
64-
[//]: # (successful open-source practices in the AI and computer science communities. )
65-
66-
[//]: # (Tools like PyTorch and TensorFlow, along with benchmark datasets such as )
67-
68-
[//]: # (ImageNet and algorithms like AlexNet, have revolutionized AI and data science. )
69-
70-
[//]: # (Our goal is to replicate this successful model in the field of radiotherapy by )
71-
72-
[//]: # (equipping researchers with PortPy toolkit, benchmark algorithms, and datasets, )
73-
74-
[//]: # (as outlined below:)
75-
76-
[//]: # ()
77-
[//]: # (1. **PortPy Toolkit**. A set of python classes and functions allowing users to load the data, )
78-
79-
[//]: # (generate IMRT/VMAT plans, and evaluate/visualize the results. For more info, see our Jupyter Notebooks [basic_tutorial]&#40;&#41;)
80-
81-
[//]: # (2. **Benchmark Datasets**. We have curated and made publicly available a dataset of 100 lung cancer patients,)
82-
83-
[//]: # (which includes all the necessary data for treatment plan optimization &#40;e.g., beamlets, voxels, pre-computed dose influence matrix&#41;. )
84-
85-
[//]: # (These data are extracted from the commercial Eclipse treatment planning system using its API. Using your own data is currently only supported for Eclipse TPS users. For more info, see our Jupyter Notebooks &#40;[eclipse_photon_dose_calculation]&#40;https://github.com/PortPy-Project/PortPy/blob/master/examples/eclipse_photon_dose_calculation.ipynb&#41;)
86-
87-
[//]: # (3. **Baseline Algorithms**. This includes two sets of algorithms: 1&#41; fast algorithms that can generate IMRT/VMAT plans within the clinical time-frame &#40;in oder of minutes/hours&#41;,)
88-
89-
[//]: # (2&#41; slow algorithms that can generate globally optimal plans for benchmaking purposes. These plans could take weeks to generate and often involve some simplistic assumptions &#40;e.g., ignoring plan delivery efficiency in VMAT&#41;.)
90-
91-
[//]: # ()
92-
[//]: # (> Modern Portfolio Optimization in Python)
93-
94-
[//]: # ()
95-
[//]: # (---)
96-
97-
[//]: # (Test7)
98-
99-
[//]: # (Welcome to **PortPy**! Effortlessly optimize, analyze, and visualize your investment portfolios with a modern, user-friendly Python library.)
100-
101-
[//]: # ()
102-
[//]: # (<div align="center">)
103-
104-
[//]: # ( <img src="https://raw.githubusercontent.com/your-org/portpy/main/assets/logo.png" alt="PortPy Logo" width="180"/>)
105-
106-
[//]: # (</div>)
107-
108-
[//]: # ()
109-
[//]: # (---)
110-
111-
[//]: # ()
112-
[//]: # ()
113-
[//]: # ()
114-
[//]: # (---)
115-
116-
[//]: # ()
117-
[//]: # (## Get Started)
118-
119-
[//]: # ()
120-
[//]: # (- [Installation Guide]&#40;installation.md&#41;)
121-
122-
[//]: # (- [Quickstart Tutorial]&#40;quickstart.md&#41;)
123-
124-
[//]: # (- [API Reference]&#40;reference/&#41;)
125-
126-
[//]: # (- [GitHub Repository]&#40;https://github.com/your-org/portpy&#41;)
127-
128-
[//]: # ()
129-
[//]: # (---)
130-
131-
[//]: # ()
132-
[//]: # (---)
133-
134-
[//]: # ()
135-
[//]: # (<div align="center">)
136-
137-
[//]: # ( <a href="quickstart.md"><b>Start Optimizing Your Portfolio →</b></a>)
13898

139-
[//]: # (</div>)
14099

docs/quick_start.md

Lines changed: 28 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,35 @@
11
## Installation
2-
1. **Using pip**:
3-
4-
* Run the command
5-
```
6-
pip install portpy
7-
```
8-
* You can install optional packages using
9-
```
10-
pip install portpy[mosek, pydicom]
11-
```
12-
* For installing AI related packages
13-
```
14-
pip install portpy[ai]
15-
```
16-
* For installing all the additional packages
17-
```
18-
pip install portpy[all]
19-
```
2+
???+ example "Installing PortPy"
203

21-
2. **From source**:
22-
23-
* Clone this repository using
24-
```
25-
git clone https://github.com/PortPy-Project/PortPy.git
26-
```
27-
* Navigate to the repository with
28-
```
29-
cd portpy
30-
```
4+
=== "pip/conda"
315

32-
* Install the dependencies within a Python virtual environment or Anaconda environment. To set up in a Python virtual environment, install all the dependencies specified in requirements.txt as follows:
33-
* Create the virtual environment with
34-
```
35-
python3 -m venv venv
36-
```
37-
* Activate the environment with
38-
```
39-
source venv/bin/activate
40-
```
41-
* Install the requirements using
42-
```
43-
pip install -r requirements.txt
44-
```
6+
To install PortPy with all its dependecies (recommonded).
7+
```bash
8+
pip install portpy[all]
9+
```
10+
To install PortPy with only optional dependencies.
11+
```bash
12+
pip install portpy[ai, mosek, pydicom]
13+
```
14+
To install PortPy with only the core dependencies.
15+
```bash
16+
pip install portpy
17+
```
4518

19+
=== "From source"
20+
21+
1- Clone this repository
22+
```bash
23+
git clone https://github.com/PortPy-Project/PortPy.git
24+
```
25+
2- Navigate to the repository
26+
```bash
27+
cd portpy
28+
```
29+
3- Install the dependencies within a Python/Anaconda virtual environment
30+
```bash
31+
pip install -r requirements.txt
32+
```
4633

4734
## Quick Start Guide
4835

docs/styles/extra.css

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,37 @@
2828
transition: width 0.3s ease !important; Optional: smooth transition */
2929

3030
}
31-
31+
/* Base table style */
32+
.md-typeset table {
33+
font-size: 16px;
34+
border-collapse: collapse;
35+
}
36+
37+
.md-typeset table td,
38+
.md-typeset table th {
39+
padding: 12px 16px;
40+
}
41+
42+
/* First column background + custom link color */
43+
.md-typeset table tr td:first-child,
44+
.md-typeset table tr th:first-child {
45+
background-color: #f5f5f5; /* Light blue */
46+
}
47+
48+
/* Second column background */
49+
.md-typeset table tr td:nth-child(2),
50+
.md-typeset table tr th:nth-child(2) {
51+
background-color: #fffbea; /* Light yellow */
52+
}
53+
54+
/* Custom hyperlink color in first column */
55+
.md-typeset table tr td:first-child a {
56+
color: #1a5e9a; /* A deep, professional blue */
57+
text-decoration: none; /* Remove underline */
58+
font-weight: 500; /* Slightly bold for visibility */
59+
}
60+
61+
.md-typeset table tr td:first-child a:hover {
62+
color: #104d80; /* Darker on hover */
63+
text-decoration: underline;
64+
}

mkdocs.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,11 @@ markdown_extensions: # Adds features to Markd
102102
- pymdownx.superfences # Enables nested code blocks
103103
- pymdownx.highlight # Syntax highlighting for code blocks
104104
- pymdownx.details # Expandable details blocks
105-
- pymdownx.tabbed # Tabbed content blocks
105+
- pymdownx.tabbed: # Tabbed content blocks
106+
alternate_style: true
107+
- pymdownx.arithmatex:
108+
inline_syntax: ['dollar']
109+
106110

107111
# -------- Extra Site Settings --------
108112

@@ -112,9 +116,13 @@ extra:
112116
link: https://github.com/PortPy-Project/PortPy
113117
- icon: fontawesome/brands/python
114118
link: https://pypi.org/project/portpy-photon/
119+
arithmatex:
120+
inline: '$'
121+
block: '$$'
115122

116123
extra_javascript: # Include custom JavaScript files
117124
- js/extra.js
125+
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
118126

119127
extra_css: # Include custom CSS files
120128
- styles/extra.css

0 commit comments

Comments
 (0)