Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 25 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"navigation_with_keys": True,
"top_of_page_buttons": ["view", "edit"],
"source_repository": "https://github.com/qurit/PyTheranostics/",
"source_branch": "dev",
"source_branch": "main",
"source_directory": "docs/source/",
"light_css_variables": {
"color-brand-primary": "#0f766e",
Expand Down Expand Up @@ -129,6 +129,30 @@
nbsphinx_allow_errors = False
nbsphinx_codecell_lexer = "python"

# Furo has no download button, so give every notebook page a link to its own
# .ipynb. nbsphinx already copies that file next to the rendered HTML, so the
# href is a plain relative filename and nothing is duplicated into _downloads.
# nbsphinx_prolog is applied to notebooks only, so env.docname + ".ipynb" is
# always the source file for the page being rendered.
nbsphinx_prolog = """
{% set nbpath = env.docname + '.ipynb' %}
{% set nbfile = env.docname.split('/')|last|e + '.ipynb' %}

.. raw:: html

<div class="admonition note nbsphinx-download">
<p class="admonition-title">Jupyter notebook</p>
<p>
This page was generated from
<a class="reference external"
href="https://github.com/qurit/PyTheranostics/blob/main/docs/source/{{ nbpath }}">{{ nbpath }}</a>.
<a class="reference download internal"
href="{{ nbfile }}" download>Download the notebook</a>
to run it on your own data.
</p>
</div>
"""

myst_enable_extensions = [
"colon_fence",
"deflist",
Expand Down
9 changes: 8 additions & 1 deletion docs/source/tutorials/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
Tutorials
=========

Hands-on walkthroughs that demonstrate common PyTheranostics workflows.
Hands-on walkthroughs that demonstrate common PyTheranostics workflows.

Most pages here are guided lessons: read them through, and run the cells if you
want to follow along. A few are task-oriented notebooks meant to be downloaded,
configured and executed against your own data — they say so at the top. For
those, keep patient data, credentials and generated outputs outside the
repository, and never commit executed cells containing patient information.

.. toctree::
:maxdepth: 1
Expand All @@ -11,5 +17,6 @@ Hands-on walkthroughs that demonstrate common PyTheranostics workflows.
Data_Ingestion_Examples/Data_Ingestion_Examples
segmentation/total_segmentator_tutorial
qSPECT/qSPECT_Tutorial
qSPECT/counts_to_bqml
ROI_Mapping_Tutorial/ROI_Mapping_Tutorial
Dosimetry_Pipeline/voxel_based_dosimetry_with_lu177_dose_kernel
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@
"id": "workflow-introduction",
"metadata": {},
"source": [
"# Convert reconstructed SPECT counts to Bq/mL\n",
"# Convert reconstructed SPECT counts to Bq/mL (batch)\n",
"\n",
"This workflow finds reconstructed SPECT DICOM files below a user-selected directory, converts each image from scanner counts to quantitative Bq/mL with `DicomModify.make_bqml_suv`, and writes a new file beside the source using the suffix `_qSPECT.dcm`.\n",
"This page finds reconstructed SPECT DICOM files below a user-selected directory, converts each image from scanner counts to quantitative Bq/mL with `DicomModify.make_bqml_suv`, and writes a new file beside the source using the suffix `_qSPECT.dcm`.\n",
"\n",
"One run represents **one radiopharmaceutical administration**. All time points therefore share the calibration factor, injection record, patient weight and height. Run the notebook separately for data from different administrations. Source files are never modified."
"It is the batch counterpart to the [qSPECT Tutorial](qSPECT_Tutorial.ipynb), which converts a single image and explains what the conversion does to the pixels and the header. Read that one first; this page assumes it.\n",
"\n",
"One run represents **one radiopharmaceutical administration**. All time points therefore share the calibration factor, injection record, patient weight and height. Run the notebook separately for data from different administrations. Source files are never modified.\n",
"\n",
"> **Before you run it.** Unlike the other tutorials, this notebook is meant to be configured and executed against your own data rather than read as a guided lesson. Download it with the link above, then edit the configuration cells for your study. Keep patient data, credentials and generated outputs outside the repository, and never commit executed cells that contain patient information. If you find yourself adding reusable processing logic here, move it into the `pytheranostics` package instead and keep the notebook to configuration, orchestration, review and quality control."
]
},
{
Expand Down Expand Up @@ -554,14 +558,6 @@
"skipped_count = int((conversion_summary[\"status\"] == \"skipped\").sum())\n",
"print(f\"Completed: {converted_count} converted, {skipped_count} skipped.\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "45005496",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
20 changes: 0 additions & 20 deletions workflows/README.md

This file was deleted.

Loading