Skip to main content

No project description provided

Project description

Documentation Status CI Status pypi

https://zenodo.org/badge/444523406.svg


https://github.com/MathOnco/valis/raw/main/docs/_images/banner.gif


VALIS, which stands for Virtual Alignment of pathoLogy Image Series, is a fully automated pipeline to register whole slide images (WSI) using rigid and/or non-rigid transformtions. A full description of the method is described in the paper by Gatenbee et al. 2023. VALIS uses Bio-Formats, OpenSlide, libvips, and scikit-image to read images and slides, and so is able to work with over 300 image formats. Registered images can be saved as ome.tiff slides that can be used in downstream analyses. ome.tiff format is opensource and widely supported, being readable in several different programming languages (Python, Java, Matlab, etc…) and software, such as QuPath, HALO by Idica Labs, etc…

The registration pipeline is fully automated and goes as follows:

https://github.com/MathOnco/valis/raw/main/docs/_images/pipeline.png
  1. Images/slides are converted to numpy arrays. As WSI are often too large to fit into memory, these images are usually lower resolution images from different pyramid levels.

  2. Images are processed to single channel images. They are then normalized to make them look as similar as possible. Masks are then created to focus registration on the tissue.

  3. Image features are detected and then matched between all pairs of image.

  4. If the order of images is unknown, they will be optimally ordered based on their feature similarity. This increases the chances of successful registration because each image will be aligned to one that looks very similar.

  5. Images will be aligned towards (not to) a reference image. If the reference image is not specified, it will automatically be set to the image at the center of the stack.

  6. Rigid registration is performed serially, with each image being rigidly aligned towards the reference image. That is, if the reference image is the 5th in the stack, image 4 will be aligned to 5 (the reference), and then 3 will be aligned to the now registered version of 4, and so on. Only features found in both neighboring slides are used to align the image to the next one in the stack. VALIS uses feature detection to match and align images, but one can optionally perform a final step that maximizes the mutual information between each pair of images. This rigid registration can optionally be updated by matching features in higher resolution versions of the images (see micro_rigid_registrar.MicroRigidRegistrar).

  7. The registered rigid masks are combined to create a non-rigid registration mask. The bounding box of this mask is then used to extract higher resolution versions of the tissue from each slide. These higher resolution images are then processed as above and used for non-rigid registration, which is performed either by:

    • aligning each image towards the reference image following the same sequence used during rigid registration.

    • using groupwise registration that non-rigidly aligns the images to a common frame of reference. Currently this is only possible if SimpleElastix is installed.

  8. One can optionally perform a second non-rigid registration using an even higher resolution versions of each image. This is intended to better align micro-features not visible in the original images, and so is referred to as micro-registration. A mask can also be used to indicate where registration should take place.

  9. Error is estimated by calculating the distance between registered matched features in the full resolution images.

The transformations found by VALIS can then be used to warp the full resolution slides. It is also possible to merge non-RGB registered slides to create a highly multiplexed image. These aligned and/or merged slides can then be saved as ome.tiff images. The transformations can also be use to warp point data, such as cell centroids, polygon vertices, etc…

In addition to registering images, VALIS provides tools to read slides using Bio-Formats and OpenSlide, which can be read at multiple resolutions and converted to numpy arrays or pyvips.Image objects. One can also slice regions of interest from these slides and warp annotated images. VALIS also provides functions to convert slides to the ome.tiff format, preserving the original metadata. Please see examples and documentation for more details.

Full documentation with installation instructions and examples can be found at ReadTheDocs.

License

MIT © 2021-2024 Chandler Gatenbee

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

valis_wsi-1.1.0.tar.gz (94.5 MB view details)

Uploaded Source

Built Distribution

valis_wsi-1.1.0-py3-none-any.whl (94.5 MB view details)

Uploaded Python 3

File details

Details for the file valis_wsi-1.1.0.tar.gz.

File metadata

  • Download URL: valis_wsi-1.1.0.tar.gz
  • Upload date:
  • Size: 94.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for valis_wsi-1.1.0.tar.gz
Algorithm Hash digest
SHA256 7b6401d56ca516a89968b133c329bbab0c5b93ad721af2771c844ecac5a232bc
MD5 86759c956171c4b9a9f28ac94f6d299e
BLAKE2b-256 af4d336c933d0a0e9ea72302408827d90b25a1e4f9e548f5b80f26ebabf6477a

See more details on using hashes here.

File details

Details for the file valis_wsi-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: valis_wsi-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 94.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.19

File hashes

Hashes for valis_wsi-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e0499d2e9b2d1db73b5e582425466bf4c8d1d1661afc52ca0651392abdf20fee
MD5 c4f9a823139c82ec771d96573349b144
BLAKE2b-256 2003e1c31b36568093b6e98ca3c2767a191c101e7771268e15447352e66e10cc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page