Skip to main content

Robust quad-tree based registration on whole slide images

PyPI version fury.io MIT license

This is a library that implements a quad-tree based registration on whole slide images.

Core features

  • Whole Slide Image support
  • Robust and fast
  • Rigid and non-rigid transformation

Additional Requirements

Install OpennSlide

Notebooks

Example notebooks are in the demo folder or Collab.

Ho-To:

Import package and create Quad-Tree.

import qt_wsi_reg.registration_tree as registration

parameters = {
    # feature extractor parameters
    "point_extractor": "sift",  #orb , sift
    "maxFeatures": 512, 
    "crossCheck": False, 
    "flann": False,
    "ratio": 0.6, 
    "use_gray": False,

    # QTree parameter 
    "homography": True,
    "filter_outliner": False,
    "debug": False,
    "target_depth": 1,
    "run_async": True,
    "num_workers: 2,
    "thumbnail_size": (1024, 1024)
}

qtree = registration.RegistrationQuadTree(source_slide_path=Path("examples/4Scanner/Aperio/Cyto/A_BB_563476_1.svs"), target_slide_path="examples/4Scanner/Aperio/Cyto/A_BB_563476_1.svs", **parameters)

Show some registration debug information.

qtree.draw_feature_points(num_sub_pic=5, figsize=(10, 10))

Show annotations on the source and target image in the format:

[["center_x", "center_y", "anno_width", "anno_height"]]

annos = np.array([["center_x", "center_y", "anno_width", "anno_height"]])
qtree.draw_annotations(annos, num_sub_pic=5, figsize=(10, 10))

Transform coordinates

box = [source_anno.center_x, source_anno.center_y, source_anno.anno_width, source_anno.anno_height]

trans_box = qtree.transform_boxes(np.array([box]))[0]

Metadata

Release files for qt-wsi-registration 0.0.14

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

Source distribution (sdist)

Source distribution for qt-wsi-registration 0.0.14
File Size Uploaded
qt_wsi_registration-0.0.14.tar.gz 17.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qt-wsi-registration 0.0.14
File Interpreter ABI Platform
qt_wsi_registration-0.0.14-py3-none-any.whl Python 3 none any Details

Total release size: 37.1 kB

Release files / qt_wsi_registration-0.0.14.tar.gz

Download URL qt_wsi_registration-0.0.14.tar.gz
Size 17.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e3af4e50a1f58a2d3fa71d91c4bf8488c5ee71d891500c4c93716eb771d6956e
BLAKE2b-256 checksum
How to use checksums
651c2e13a6860cc4adc9392da566df8521d49aefd7f0babceb978fcaaed4a72a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / qt_wsi_registration-0.0.14-py3-none-any.whl

Download URL qt_wsi_registration-0.0.14-py3-none-any.whl
Size 19.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
590b7f8cf6e126f881108449af6e166133fb0d43ba4157191dbac382e61320dc
BLAKE2b-256 checksum
How to use checksums
a70a03e6198c90b71ec3a2ae34680cee3678a37d02cd81d06503030fc22834d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.0.14 This release

2 release files

0.0.13

1 release file

0.0.12

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.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