Skip to content

A tool for generating PATHOlogy OVERVIEW figures from whole-slide image files.

License

Notifications You must be signed in to change notification settings

EpiCENTR-Lab/PATHOverview

Repository files navigation

PATHOverview

A tool for generating PATHOlogy Overview figures from whole-slide image files. This tool was developed to create easy to view multi-page multi-panel figures to see all histology slides from one sample at a time. It has since evolved!

PATHOverview rotates, crops and zooms whole slide files to generate customised images, these can then be exported as multi-panel figures.

Default PATHOverview figure:
An example PATHOverview image

Inverted PATHOverview figure:
An example PATHOverview image

An example output pdf is contained in the test_files folder. This has been generated using parameters set in slide_lists_demo.xlsx and our interactive Jupyter notebook. Further examples can be found in our publication linked below.
Basic usage of PATHOverview is detailed in our test notebook. Whole slide files can be listed (and NDPA annotation read) using PATHOverview_list_files.ipynb. An interactive Jupyter notebook is provided for setting crop parameters for each slide.

PATHOverview uses OpenSlide (openslide.org) and its python bindings to access virtual slide images. PATHOverview has been tested on Hamamatsu Nanozoomer NDPI images. The example notebooks require freely available ndpi images OS-1.ndpi and OS-2.ndpi from OpenSlide which should be placed in the /test_files folder.

This tool was developed to present immunohistochemistry images from Hamamatsu Nanozoomer ndpi virtual slide files in our publication below. Please cite this repository and our publication if this tool has been of use.

Phenotyping of lymphoproliferative tumours generated in xenografts of non-small cell lung cancer.
David R. Pearce, Ayse U. Akarca, Roel P. H. De Maeyer, Emily Kostina, Ariana Huebner, Monica Sivakumar, Takahiro Karasaki, Kavina Shah, Sam M. Janes, Nicholas McGranahan, Venkat Reddy, Arne N. Akbar, David A. Moore, Teresa Marafioti, Charles Swanton and Robert E. Hynds
https://www.frontiersin.org/articles/10.3389/fonc.2023.1156743/full
Frontiers in Oncology 2023; doi: https://doi.org/10.3389/fonc.2023.1156743
bioRxiv 2023.01.24.520089; doi: https://doi.org/10.1101/2023.01.24.520089

Getting started & running examples

Outline

  • Download this repository
  • Install JupyterLab Desktop
  • In JupyterLab: install the required python packages including the openslide-python bindings and OpenSlide binaries
  • Open pathoverview_basic_use.ipynb
  • Run the example notebook

Requirements

PATHOverview uses OpenSlide to read whole slide images. OpenSlide is installed in two components: the OpenSlide program and openslide-python bindings.

PATHOverview requires OpenSlide and the following python packages:
openslide-python, pillow, openpyxl, matplotlib, pandas, jupyterlab, ipywidgets, ipympl

Installation

Recomended: Jupyter Lab Desktop

pip install openslide-python openslide-bin pillow openpyxl matplotlib pandas jupyterlab ipywidgets ipympl

To do:

  • Add inverted figure of zoom image with inset overview
  • Draw parameters from slide_df on interactive figure where already set
  • Add white balance
  • Read parameters from NDPA files to enable more accurate zoom etc.
  • Write ndpa files from interactive notebook
  • Check compatability with other slide formats
  • assess improvements to memory usage and speed

About

A tool for generating PATHOlogy OVERVIEW figures from whole-slide image files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published