From 4e4873cca0673f1f35f9f0cbd9a794533434e2b6 Mon Sep 17 00:00:00 2001 From: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com> Date: Fri, 24 Jan 2025 14:57:19 +0000 Subject: [PATCH 01/10] :memo: Update readthedocs build --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 088cc873e..b5fe44517 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -80,7 +80,7 @@ nb_execution_mode = "off" # The master toctree document. -master_doc = "index" +master_doc = "readme" # General information about the project. project = "TIA Toolbox" From 506c63fe1d61e4f4c598a9329dbc218630d04ddd Mon Sep 17 00:00:00 2001 From: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com> Date: Fri, 24 Jan 2025 15:53:28 +0000 Subject: [PATCH 02/10] :memo: Include README to `index.rst` --- docs/conf.py | 2 +- docs/index.rst | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index b5fe44517..088cc873e 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -80,7 +80,7 @@ nb_execution_mode = "off" # The master toctree document. -master_doc = "readme" +master_doc = "index" # General information about the project. project = "TIA Toolbox" diff --git a/docs/index.rst b/docs/index.rst index 0db59ede2..0ddeacbae 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,9 +1,8 @@ Welcome to TIA Toolbox's documentation! ======================================= -.. image:: tia_logo.png - :alt: alternate text - :align: center +.. include:: ../README.md + :parser: myst_parser.sphinx_ .. toctree:: :maxdepth: 2 From 842b778e7466a0086593a32082f419cd132f3eb1 Mon Sep 17 00:00:00 2001 From: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com> Date: Fri, 24 Jan 2025 16:45:52 +0000 Subject: [PATCH 03/10] :memo: Add example notebooks.rst --- docs/index.rst | 2 +- docs/notebooks.rst | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 0ddeacbae..6c5c6493e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -5,7 +5,7 @@ Welcome to TIA Toolbox's documentation! :parser: myst_parser.sphinx_ .. toctree:: - :maxdepth: 2 + :maxdepth: 1 Readme Installation diff --git a/docs/notebooks.rst b/docs/notebooks.rst index 58e5fac03..2bd997b72 100644 --- a/docs/notebooks.rst +++ b/docs/notebooks.rst @@ -1,15 +1,18 @@ Jupyter Notebooks ################# +.. include:: _notebooks/README.md + :parser: myst_parser.sphinx_ + .. toctree:: - :maxdepth: 2 + :maxdepth: 1 _notebooks/README.md | .. toctree:: - :maxdepth: 3 + :maxdepth: 2 :glob: Basic Functionalities @@ -17,7 +20,7 @@ Jupyter Notebooks | .. toctree:: - :maxdepth: 3 + :maxdepth: 2 :glob: Pipelines From fa7d5e80b523f97b76b854b09637aeca4b7285d0 Mon Sep 17 00:00:00 2001 From: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com> Date: Wed, 5 Feb 2025 13:21:42 +0000 Subject: [PATCH 04/10] :memo: Update documentation structure - Remove usage.rst - Rename Jupyter Notebooks to Usage Examples - Show README for Usage Examples instead of TOC. - Reduce TOC depth for basic functionalities and pipelines --- docs/basic_functionalities.rst | 2 +- docs/conf.py | 2 +- docs/index.rst | 3 +- docs/jnb_pipelines.rst | 2 +- docs/notebooks.rst | 7 -- docs/usage.rst | 134 --------------------------------- 6 files changed, 4 insertions(+), 146 deletions(-) delete mode 100644 docs/usage.rst diff --git a/docs/basic_functionalities.rst b/docs/basic_functionalities.rst index aaa9e77b6..8aedd9695 100644 --- a/docs/basic_functionalities.rst +++ b/docs/basic_functionalities.rst @@ -2,7 +2,7 @@ Basic Functionalities ********************* .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :glob: _notebooks/jnb/* diff --git a/docs/conf.py b/docs/conf.py index 088cc873e..a49f6f873 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2016,8 +2016,8 @@ def all_but_ipynb(dir_path, contents): # Replace the target string file_data = file_data.replace(".rst", ".html") file_data = file_data.replace(".ipynb", ".html") -file_data = file_data.replace("../docs/", "../") file_data = file_data.replace("](./", "](./jnb/") +file_data = file_data.replace("../docs/", "./") # Write the file out again with open("_notebooks/README.md", "w") as file: diff --git a/docs/index.rst b/docs/index.rst index 6c5c6493e..18b51dea3 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -9,9 +9,8 @@ Welcome to TIA Toolbox's documentation! Readme Installation - Usage Pre-trained Models - Jupyter Notebooks + Usage Examples Algorithms Visualization API Reference <_autosummary/tiatoolbox> diff --git a/docs/jnb_pipelines.rst b/docs/jnb_pipelines.rst index 76b680e61..d7d4a957d 100644 --- a/docs/jnb_pipelines.rst +++ b/docs/jnb_pipelines.rst @@ -2,7 +2,7 @@ Pipelines ********* .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :glob: _notebooks/jnb/inference-pipelines/* diff --git a/docs/notebooks.rst b/docs/notebooks.rst index 2bd997b72..687f1995c 100644 --- a/docs/notebooks.rst +++ b/docs/notebooks.rst @@ -4,16 +4,10 @@ Jupyter Notebooks .. include:: _notebooks/README.md :parser: myst_parser.sphinx_ -.. toctree:: - :maxdepth: 1 - - _notebooks/README.md - | .. toctree:: :maxdepth: 2 - :glob: Basic Functionalities @@ -21,6 +15,5 @@ Jupyter Notebooks .. toctree:: :maxdepth: 2 - :glob: Pipelines diff --git a/docs/usage.rst b/docs/usage.rst deleted file mode 100644 index cd25e6c21..000000000 --- a/docs/usage.rst +++ /dev/null @@ -1,134 +0,0 @@ -===== -Usage -===== - -To use TIA Toolbox in a project:: - - import tiatoolbox - -^^^^^^^^^^^^^^^^^^^^^^ -Reading WSI Image Data -^^^^^^^^^^^^^^^^^^^^^^ - -- :obj:`wsireader ` -- :obj:`WSIReader ` - - - :obj:`DICOMWSIReader ` - - :obj:`NGFFWSIReader ` - - :obj:`OmnyxJP2WSIReader ` - - :obj:`OpenSlideWSIReader ` - - :obj:`TIFFWSIReader ` - - :obj:`VirtualWSIReader ` - -^^^^^^^^^^^^^^^^^^ -Accessing Metadata -^^^^^^^^^^^^^^^^^^ - -- :obj:`WSIMeta ` - -^^^^^^^^^^ -Functional -^^^^^^^^^^ - -The wsicore module also includes some functional syntax for quickly -obtaining information about a slide or generating tiles. - -- :obj:`slide_info ` -- :obj:`save_tiles ` - -^^^^^^^^^^^^^^^^^^ -Stain Extraction -^^^^^^^^^^^^^^^^^^ - -- :obj:`Stain Extraction ` - -^^^^^^^^^^^^^^^^^^^ -Stain Normalization -^^^^^^^^^^^^^^^^^^^ - -- :obj:`get_normalizer ` -- :obj:`StainNormalizer ` -- :obj:`CustomNormalizer ` -- :obj:`RuifrokNormalizer ` -- :obj:`MacenkoNormalizer ` -- :obj:`VahadaneNormalizer ` -- :obj:`ReinhardNormalizer ` - -^^^^^^^^^^^^^^^ -Tissue Masking -^^^^^^^^^^^^^^^ - -- :obj:`Tissue Mask ` - -^^^^^^^^^^^^^^^^^^ -Stain Augmentation -^^^^^^^^^^^^^^^^^^ - -- :obj:`Stain Augmentation ` - -^^^^^^^^^^^^^^^^^^ -Patch Extraction -^^^^^^^^^^^^^^^^^^ - -- :obj:`get_patch_extractor ` -- :obj:`PointsPatchExtractor ` -- :obj:`SlidingWindowPatchExtractor ` - -^^^^^^^^^^^^^^^^^^ -Graph Construction -^^^^^^^^^^^^^^^^^^ - -- :obj:`Slide Graph Constructor ` - -^^^^^^^^^^^^^^^^^^^^^^^ -Tile Pyramid Generation -^^^^^^^^^^^^^^^^^^^^^^^ - -- :obj:`Tile Pyramid Generator ` -- :obj:`Zoomify ` - -^^^^^^^^^^^^^^^^^^^^ -Dataset -^^^^^^^^^^^^^^^^^^^^ - -- :obj:`Kather Dataset ` - -^^^^^^^^^^^^^^^^^^^^ -Deep Learning Models -^^^^^^^^^^^^^^^^^^^^ - --------------- -Engine --------------- - -- :obj:`Patch Prediction ` -- :obj:`Semantic Segmentation ` -- :obj:`Feature Extraction ` -- :obj:`Nucleus Instance Segmnetation ` - ----------------------------- -Neural Network Architectures ----------------------------- - -- :obj:`Torch Vision CNNs ` -- :obj:`Simplified U-Nets ` -- :obj:`HoVerNet ` -- :obj:`HoVerNet+ ` -- :obj:`MicroNet ` -- :obj:`MapDe ` -- :obj:`SCCNN ` - -Pipelines: - - :obj:`IDARS ` - -^^^^^^^^^ -Utilities -^^^^^^^^^ - -- :obj:`Environment Detection ` -- :obj:`Exceptions ` -- :obj:`Image ` -- :obj:`Metrics ` -- :obj:`Miscellaneous ` -- :obj:`Transforms ` -- :obj:`Visualization ` From c173c8307c38d5d5f2232658b2f919a13af2cf4d Mon Sep 17 00:00:00 2001 From: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com> Date: Wed, 5 Feb 2025 13:51:41 +0000 Subject: [PATCH 05/10] :pushpin: Python 3.12 for building docs --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 5aa9d29d5..b5a35d92e 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -9,7 +9,7 @@ version: 2 build: os: ubuntu-24.04 tools: - python: "3.10" + python: "3.12" apt_packages: - openslide-tools - libopenjp2-7-dev From ac478d9dfc57b2f08ec96c92d4f3a75c60300fbb Mon Sep 17 00:00:00 2001 From: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com> Date: Wed, 5 Feb 2025 13:55:29 +0000 Subject: [PATCH 06/10] :memo: Update copyright year. --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index a49f6f873..f848582c0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -84,7 +84,7 @@ # General information about the project. project = "TIA Toolbox" -copyright = "2023, TIA Lab" +copyright = "2025, TIA Lab" author = "TIA Lab" # The version info for the project you're documenting, acts as replacement From a65e09ceb8f3e1329a990025e024427a179b0498 Mon Sep 17 00:00:00 2001 From: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com> Date: Thu, 6 Feb 2025 11:25:06 +0000 Subject: [PATCH 07/10] [skip ci] :memo: Update README.md --- README.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e69cfbe33..9b5ede273 100644 --- a/README.md +++ b/README.md @@ -45,25 +45,28 @@ ## Getting Started -TIAToolbox is a computational pathology toolbox developed by TIA Centre that provides an end-to-end API for pathology image analysis using best practices. It is based on **[PyTorch](https://pytorch.org/)**, a popular deep learning framework that enables efficient and flexible implementation of state-of-the-art algorithms. TIAToolbox supports many features through a command-line interface and can integrate with standard PyTorch modules. It also offers tools for data loading, pre-processing, model inference, post-processing, and visualization. Whether you are a computational, biomedical, or clinical researcher, TIAToolbox can help you get started in digital pathology with minimal effort. +TIAToolbox is a computational pathology toolbox developed by the TIA Centre. It provides an end-to-end API for pathology image analysis using best practices. Based on **[PyTorch](https://pytorch.org/)**, a popular deep learning framework, TIAToolbox enables efficient and flexible implementation of state-of-the-art algorithms. It supports many features through a command-line interface and can integrate with standard PyTorch modules. The toolbox offers tools for data loading, pre-processing, model inference, post-processing, and visualization. Whether you are a computational, biomedical, or clinical researcher, TIAToolbox can help you get started in digital pathology with minimal effort. ### All Users -This package is for those interested in digital pathology: including graduate students, medical staff, members of the TIA Centre and of PathLAKE, and anyone, anywhere, who may find it useful. We will continue to improve this package, taking account of developments in pathology, microscopy, computing and related disciplines. Please send comments and criticisms to **[tia@dcs.warwick.ac.uk](mailto:tialab@dcs.warwick.ac.uk)**. +This package is designed for those interested in digital pathology, including graduate students, medical staff, members of the TIA Centre and PathLAKE, and anyone who may find it useful. We will continue to improve this package, taking into account developments in pathology, microscopy, computing, and related disciplines. Please send comments and feedback to **[tia@dcs.warwick.ac.uk](mailto:tialab@dcs.warwick.ac.uk)**. -**`tiatoolbox`** is a multipurpose name that we use for 1) a certain computer program, 2) a Python package of related programs, created by us at the TIA Centre to help people get started in Digital Pathology, 3) this repository, 4) a certain virtual environment. +**[`tiatoolbox`](tiatoolbox)** refers to: -### Developers +1. A specific computer program. +1. A Python package of related programs created by the TIA Centre to help people get started in Digital Pathology. +1. This repository. +1. A specific virtual environment. -Anyone wanting to contribute to this repository, please first look at our [Wiki](https://github.com/TissueImageAnalytics/tiatoolbox/wiki) and at our web page for [contributors](https://github.com/TissueImageAnalytics/tiatoolbox/blob/master/CONTRIBUTING.rst). See also the *Prepare for development* section of this document. +### Developers -### Links, if needed +If you want to contribute to this repository, please first look at our [Wiki](https://github.com/TissueImageAnalytics/tiatoolbox/wiki) and our [contributor guidelines](https://github.com/TissueImageAnalytics/tiatoolbox/blob/master/CONTRIBUTING.rst). Also, see the *Prepare for development* section of this document. -The [bash](https://www.gnu.org/software/bash) shell is available on all commonly encountered platforms. Commands in this README are in bash. Windows users can use the command prompt to install conda and python packages. +### Useful Links -[conda](https://github.com/conda/conda) is a management system for software packages and [virtual environments](https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/environments.html). To get `conda`, download [Anaconda](https://www.anaconda.com/), which includes hundreds of the most useful Python packages, using 2GB disk space. Alternatively, [miniconda](https://docs.conda.io/en/latest/miniconda.html) uses 400MB, and packages can be added as needed. +The [bash](https://www.gnu.org/software/bash) shell is available on all commonly encountered platforms. Commands in this README are in bash. Windows users can use the command prompt to install conda and Python packages. -[GitHub](https://github.com/about) is powered by the version control system [git](https://git-scm.com/), which has many users and uses. In GitHub, it is used to track versions of code and other documents. +[conda](https://github.com/conda/conda) is a management system for software packages and [virtual environments](https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/environments.html). To get `conda`, download [Anaconda](https://www.anaconda.com/), which includes hundreds of the most useful Python packages, using 2GB of disk space. Alternatively, [miniconda](https://docs.conda.io/en/latest/miniconda.html) uses 400MB, and packages can be added as needed. ### Examples Taster From 1d8c7c61d8285f12ee85396d896f7162cc04507b Mon Sep 17 00:00:00 2001 From: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:12:18 +0000 Subject: [PATCH 08/10] [skip ci] :memo: Remove redundant text. --- README.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/README.md b/README.md index 9b5ede273..3780805a7 100644 --- a/README.md +++ b/README.md @@ -51,13 +51,6 @@ TIAToolbox is a computational pathology toolbox developed by the TIA Centre. It This package is designed for those interested in digital pathology, including graduate students, medical staff, members of the TIA Centre and PathLAKE, and anyone who may find it useful. We will continue to improve this package, taking into account developments in pathology, microscopy, computing, and related disciplines. Please send comments and feedback to **[tia@dcs.warwick.ac.uk](mailto:tialab@dcs.warwick.ac.uk)**. -**[`tiatoolbox`](tiatoolbox)** refers to: - -1. A specific computer program. -1. A Python package of related programs created by the TIA Centre to help people get started in Digital Pathology. -1. This repository. -1. A specific virtual environment. - ### Developers If you want to contribute to this repository, please first look at our [Wiki](https://github.com/TissueImageAnalytics/tiatoolbox/wiki) and our [contributor guidelines](https://github.com/TissueImageAnalytics/tiatoolbox/blob/master/CONTRIBUTING.rst). Also, see the *Prepare for development* section of this document. From c6c5f925c6a48d307837bcd9ff1c6fab7266e7f4 Mon Sep 17 00:00:00 2001 From: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:31:48 +0000 Subject: [PATCH 09/10] [skip ci] :memo: Add index heading --- docs/conf.py | 4 ++-- docs/index.rst | 4 +++- docs/{notebooks.rst => usage_examples.rst} | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) rename docs/{notebooks.rst => usage_examples.rst} (95%) diff --git a/docs/conf.py b/docs/conf.py index f848582c0..91fd2df51 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2005,8 +2005,8 @@ def all_but_ipynb(dir_path, contents): ) # shutil.copy( -# os.path.join(PROJ_ROOT, "docs/notebooks.rst"), -# os.path.join(PROJ_ROOT, "docs/_notebooks/notebooks.rst"), +# os.path.join(PROJ_ROOT, "docs/usage_examples.rst"), +# os.path.join(PROJ_ROOT, "docs/_notebooks/usage_examples.rst"), # ) # Read in the file diff --git a/docs/index.rst b/docs/index.rst index 18b51dea3..3ced80e79 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -7,10 +7,12 @@ Welcome to TIA Toolbox's documentation! .. toctree:: :maxdepth: 1 +Index +----- Readme Installation Pre-trained Models - Usage Examples + Usage Examples Algorithms Visualization API Reference <_autosummary/tiatoolbox> diff --git a/docs/notebooks.rst b/docs/usage_examples.rst similarity index 95% rename from docs/notebooks.rst rename to docs/usage_examples.rst index 687f1995c..118bfafaa 100644 --- a/docs/notebooks.rst +++ b/docs/usage_examples.rst @@ -4,7 +4,8 @@ Jupyter Notebooks .. include:: _notebooks/README.md :parser: myst_parser.sphinx_ -| +Index +----- .. toctree:: :maxdepth: 2 From 9ac7388efc74d40d3bb30d19b84f9cc69ed2b548 Mon Sep 17 00:00:00 2001 From: Shan E Ahmed Raza <13048456+shaneahmed@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:42:04 +0000 Subject: [PATCH 10/10] [skip ci] :bug: Fix heading --- docs/index.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 3ced80e79..e84f9fb4e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -4,11 +4,12 @@ Welcome to TIA Toolbox's documentation! .. include:: ../README.md :parser: myst_parser.sphinx_ +Index +----- + .. toctree:: :maxdepth: 1 -Index ------ Readme Installation Pre-trained Models