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.6.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

qt_wsi_registration-0.0.6-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: qt-wsi-registration-0.0.6.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.6.12

File hashes

Hashes for qt-wsi-registration-0.0.6.tar.gz
Algorithm Hash digest
SHA256 6c3023e79b4d23089d12cd87397ff5149dc82927f501456a9ab40f63772ed2c6
MD5 9e6f2d3af4c8e3a7f061c40968925b0d
BLAKE2b-256 f0ece56cc01040e5cca549475114425406f46c6def43e55e5d51fa73ff2e439a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: qt_wsi_registration-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.6.12

File hashes

Hashes for qt_wsi_registration-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 73bb6ec07808c2eec7704004f41ba6573905af871ec07d8fe8c0f92324dde3f2
MD5 fdaceac330ad528d33077539dd7b6da4
BLAKE2b-256 7fdec55b131a10dc5480720e8e3ae41e49397fabda00de645da35f1e57b33b09

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