Skip to main content

Robust quad-tree based registration on whole slide images

Project description

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]

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

qt-wsi-registration-0.0.9.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

qt_wsi_registration-0.0.9-py3-none-any.whl (18.9 kB view details)

Uploaded Python 3

File details

Details for the file qt-wsi-registration-0.0.9.tar.gz.

File metadata

  • Download URL: qt-wsi-registration-0.0.9.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.6.13

File hashes

Hashes for qt-wsi-registration-0.0.9.tar.gz
Algorithm Hash digest
SHA256 b088d7895b4177dec3f756311d32e81b285ce4a7c8d5672558b9bb42dbf4a146
MD5 300f73389265445887dae7e7befa48eb
BLAKE2b-256 9cf231a0b39b621c8dcd7abf9a645c22ef8a9fdd00b86a12090c3820b3f44c96

See more details on using hashes here.

File details

Details for the file qt_wsi_registration-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: qt_wsi_registration-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 18.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.6.13

File hashes

Hashes for qt_wsi_registration-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 6302092f23de15abc275f24775c2fcecc3d4210c19f3901fc1879ab213e3f2de
MD5 b0a34d33706e02214e3a45d3022ad554
BLAKE2b-256 17f139171b1502f44e7df8fba7d29eb844afae910f0db46f9b79d98460c445f5

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