Skip to main content

Penn Digital Neuropathology Lab's (PDNL) Visualization Tools

This project is an ongoing development of visualization tools used for digital IHC analysis.

Requirements

Python3.12 or newer: https://github.com/PackeTsar/Install-Python$0

Demo Installation (Command Line)

Create a virtual environment

Mac/Linux

python3 -m venv .pdnl_demo_venv
source .pdnl_demo_venv/bin/activate

Windows

python3 -m venv .pdnl_demo_venv
.pdnl_demo_venv\Scripts\activate

Install pdnl_viz using pip

python -m pip install pdnl_viz

Usage

pdnl_demo

Troubleshooting

Issues with numba, llvmlite, scikit-fmm

This often has to do with C++ compiler problems.

On Mac, try this: https://stackoverflow.com/a/34617930

On Windows, try installing the base tools here: https://visualstudio.microsoft.com/visual-cpp-build-tools/$0

Examples

Overview

This demo includes a series of visualizations which guide the user through the steps required to process a Whole Slide Image (WSI) file with the PDNL IHC suite of tools. The result of the demo also includes a set of parameters which can be used for processing a batch of WSI's. More information can be found in various other documentations or within tooltips in the application.

Counterstain Processing

We use the counterstain (in this image hematoxylin) in order to segment Gray Matter from White Matter in the WSI. We generally set the following parameters:

$Strictness=-0.8$, Hematoxylin is fairly specific, so we want to be lenient with thresholding.

$Smoothing=True$, Anisotropic Diffusion filtering smooths out the interiors of neuron and glia cells.

$Background Subtraction=True$, This normalizes the stain such that less background passes through the threshold

$Opening Radius=2 \mu m$, This cleans up some background noise

ROI Selection

This demo utilizes NEUSEG to segment the cortex. The parameters in the previous step are applied to this process. The feature heatmap shows the change in cellular distributions across the brain tissue. The segmentation is drawn based on these changes.

Cell Feature Heatmap Cortical Segmentations

Marker Processing

The next step is to set the processing parameters for the marker of interest. This highly depends on the characteristics of said marker, and should be determined for each marker individually. The available processing parameters are similar to the Counterstain Processing section.

ROI Quantification

Quantifying the ROI includes detecting the Positive Marker pixels and Positive Counterstain pixels, then measuring the amount of such pixels across the cortical mantle utilizing the shape of the ROI.

Next Steps

With an intuitive understanding of the available parameters and the characteristics of the marker of interest, a user can continue to the following tools for large scale analysis of WSI's.

  1. Segment WSI with NEUSEG
  2. Extract images from WSI
  3. Process images using set parameters
  4. Generate quantitative results

Roadmap

  • Streamline command line tools into a single command for WSI quantification
  • Extend GUI tools to allow batch quantification of a batch of WSI's
  • Include PDNL machine learning models (Tau Classification & Microglia Classification)

Support

For support, email noah.capp@pennmedicine.upenn.edu

Metadata

Release files for pdnl-viz 0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdnl-viz 0.2
File Size Uploaded
pdnl_viz-0.2.tar.gz 32.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pdnl-viz 0.2
File Interpreter ABI Platform
pdnl_viz-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 61.6 MB

Release files / pdnl_viz-0.2.tar.gz

Download URL pdnl_viz-0.2.tar.gz
Size 32.6 MB
Tags Source
SHA-256 checksum
How to use checksums
f2fe6772b132843e4f8cb181dae5acf354376a68e29861c39611bc79d7899bdf
BLAKE2b-256 checksum
How to use checksums
a280be2b0ee777c23362b070ec2b687edfc4dd6326faa85fa1f40e2976f3ee68
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / pdnl_viz-0.2-py3-none-any.whl

Download URL pdnl_viz-0.2-py3-none-any.whl
Size 28.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
16fcbdb742c7164385b92f7e517071ca68b44a8c0464752353a4c5b3fe3e52a0
BLAKE2b-256 checksum
How to use checksums
0a0e9b1e7cbf8835d7e1ccc3053db0e58a294ddecae5baf075fd7ba04f982fc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page