Skip to main content

Register DSA items thumbnails and return homography matrix, image size, x offset, y offset, scale x, and scale y. The registration code is based on OpenCV

Project description

dsa_reg

This package approximately computes the offsets needed to register DSA (Digital Slide Archive) item thumbnails.

Installations

Through pypi package

$ pip install dsa-reg

From Source

$ git clone git@github.com:mmasoud1/dsa_reg.git

Usage

After the package is installed, main operation can be performed as follows:

Register by Thumbnails

from dsa_reg import rigidRegByThumb

#param refItemId (string): ref image Id 
#param targetItemId (string): target image Id
#param xBaseUrl (string): DSA Server URL e.g. https://styx.neurology.emory.edu/girder/api/v1
#param xAuthentication: boolean (0,1)  
#param xEnhancement: boolean (0,1)  
#return (Dict): homography metrix, psnr, x offset, y offset, horizontal scaleX, vertical  scaleY

rigidRegByThumb(refItemId, targetItemId, xBaseUrl)

# e.g. 
rigidRegByThumb(refItemId = "5e361da534679044bda81b16", 
	            targetItemId = "5e361-SOME-OTHER-ID", 
	            xBaseUrl = "https://styx.neurology.emory.edu/girder/api/v1")



# if using a private DSA collection,  set xAuthentication = 1 to provide login credentials:

rigidRegByThumb(refItemId = "5e361da534679044bda81b16", 
	            targetItemId = "5e361-SOME-OTHER-ID", 
	            xBaseUrl = "https://styx.neurology.emory.edu/girder/api/v1", 
	            xAuthentication = 1, 
	            xEnhancement = 0)

# If a preprocessing is needed such that the tile needs enhancement before registration, set xEnhancement boolean value to 1

Register by Magnification

from dsa_reg import rigidRegByMagnification

rigidRegByMagnification(refItemId, targetItemId, xBaseUrl)

#e.g. 
rigidRegByMagnification(refItemId = "5e361da534679044bda81b16", 
			            targetItemId = "5e361-SOME-OTHER-ID", 
			            xBaseUrl = "https://styx.neurology.emory.edu/girder/api/v1")

# magnification default value is 1



rigidRegByMagnification(refItemId, targetItemId, xBaseUrl, magnification,  xAuthentication)
# magnification can be smaller value < = 1 for fast processing and wise resources use

rigidRegByMagnification(refItemId, targetItemId, xBaseUrl, magnification,  xAuthentication, xEnhancement)

#e.g. 
rigidRegByMagnification(refItemId = "5e361da534679044bda81b16", 
			            targetItemId = "5e361-SOME-OTHER-ID", 
			            xBaseUrl = "https://styx.neurology.emory.edu/girder/api/v1",
			            magnification = 0.5,
			            xAuthentication = 1,
			            xEnhancement = 1)

For contributing, issues and suggestions

Your contribution to enhance the registration technique is welcomed, please start by new issue or pull a request.

Next:

  1. This is a demo of initial and approximated rigid registration results, the target is to extend the functionality to whole slide images registration in fast, accurate mode.

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

dsa_reg-1.1.4.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

dsa_reg-1.1.4-py2-none-any.whl (4.9 kB view details)

Uploaded Python 2

File details

Details for the file dsa_reg-1.1.4.tar.gz.

File metadata

  • Download URL: dsa_reg-1.1.4.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.4.2 requests/2.19.1 setuptools/44.1.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15

File hashes

Hashes for dsa_reg-1.1.4.tar.gz
Algorithm Hash digest
SHA256 e7ee325dbbd99f40a20dba040a92e6a3d73857611fea9bc6724cb3c39c183c92
MD5 dd7b10e37ac6082b3968743c331e1e93
BLAKE2b-256 2e5add76ca76a68db0412b4cd61cd140fc9fc37eeb32bb432aab9f667f35e60d

See more details on using hashes here.

File details

Details for the file dsa_reg-1.1.4-py2-none-any.whl.

File metadata

  • Download URL: dsa_reg-1.1.4-py2-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.4.2 requests/2.19.1 setuptools/44.1.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15

File hashes

Hashes for dsa_reg-1.1.4-py2-none-any.whl
Algorithm Hash digest
SHA256 747995104647cc0f30c0381e58c2b78811428ff544f20dbe082e7fd156219b85
MD5 c593e945726b89109d283f1e47d2292b
BLAKE2b-256 3821bfd2cf001d4c21f346be4ecf4821a48bf0d0514f2c9fada0bac1dbdf61aa

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