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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qt_wsi_registration-0.0.14-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

Details for the file qt_wsi_registration-0.0.14.tar.gz.

File metadata

  • Download URL: qt_wsi_registration-0.0.14.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for qt_wsi_registration-0.0.14.tar.gz
Algorithm Hash digest
SHA256 e3af4e50a1f58a2d3fa71d91c4bf8488c5ee71d891500c4c93716eb771d6956e
MD5 374bd43aac185f68f73d26159acf0876
BLAKE2b-256 651c2e13a6860cc4adc9392da566df8521d49aefd7f0babceb978fcaaed4a72a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for qt_wsi_registration-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 590b7f8cf6e126f881108449af6e166133fb0d43ba4157191dbac382e61320dc
MD5 2372668d88d659118eec19c3a90fdfd5
BLAKE2b-256 a70a03e6198c90b71ec3a2ae34680cee3678a37d02cd81d06503030fc22834d2

See more details on using hashes here.

Supported by

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