Skip to content

Commit

Permalink
Return figure and dataframe after dose vis
Browse files Browse the repository at this point in the history
  • Loading branch information
pchlap committed Jan 22, 2023
1 parent 9e3b64c commit 437d8ab
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 227 deletions.
243 changes: 16 additions & 227 deletions examples/dvh_analysis.ipynb

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions platipy/imaging/visualisation/dose.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ def visualise_dose(
Defaults to None.
img_vis_kw (dict, optional): Dictionary of keyword arguments to pass to ImageVisualiser.
Defaults to None.
Returns:
matplotlib.figure: The figure, can be saved as usual (fig.savefig(...)).
pd.DataFrame: The dose metrics computed for display in the table.
"""

if img_vis_kw is None:
Expand Down Expand Up @@ -243,3 +247,6 @@ def visualise_dose(
wrap=True,
weight="bold",
)

# Return the figure
return fig, df_metrics

0 comments on commit 437d8ab

Please sign in to comment.