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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

qt_wsi_registration-0.0.13-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for qt_wsi_registration-0.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 6ceca24094d2430ee367921fc5f4514439c8f207cb40bb8f7ca051465926a8d3
MD5 53e2d9e04328946012158004c35d22a8
BLAKE2b-256 5a2e39728bef05e75f0fc727c1ec4ebaa7e026ce868759b70cc0454d4a51f0de

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