APPARATUS AND A METHOD FOR ON-DEMAND REGISTRATION OF WHOLE SLIDE IMAGES
A method for on-demand registration of whole slide images (WSIs), comprising receiving at least two digital images, a first digital image of a reference slide and a second digital image on a candidate slide, each at a first magnification level, identifying a first region of interest (ROI) on the first digital image at a target magnification level, registering a portion of the second digital image to a portion of the first digital slide image at the first magnification level to derive a transformation matrix, applying the transformation matrix to the first ROI to identify a second ROI on the second digital image at the first magnification level, mapping the second ROI to a corresponding second ROI on the second digital image at the target magnification level, and registering the corresponding second ROI to the first ROI at the target magnification level.
1 . An apparatus for on-demand registration of whole slide images (WSIs), wherein the apparatus comprises:
at least a processor; and
a memory communicatively connected to the at least a processor, wherein the memory contains instructions configuring the at least a processor to:
receive at least two digital images, each comprising a pyramid structure, wherein the pyramid structure comprises:
a plurality of layers representing same image content at different magnification levels; and
a first layer having an image with a first resolution and a second layer having an image with a second resolution;
identify a first region of interest (ROI) on a first digital image of the at least two digital images at a target magnification;
determine a transformation matrix as a function of at least a portion of the first digital slide image and at least a portion of a second digital image of the at least two digital images at a first magnification level corresponding to another one of the plurality of layers of the pyramid structure;
identify a second ROI on the second digital image based on applying the transformation matrix to the first ROI; and
register the second ROI to the first ROI by applying the transformation matrix at the target magnification level.
2 . The apparatus of claim 1 , wherein the first and second digital images comprise whole slide images obtained from serially sectioned slides prepared from a common biological specimen.
3 . The apparatus of claim 1 , wherein identifying the first region of interest (ROI) comprises:
generating a user interface displaying the first digital image at the target magnification level; and
receiving a selection of the first ROI from the user interface.
4 . The apparatus of claim 1 , wherein determining the transformation matrix comprises:
identifying key points within the first ROI on the first digital image and the second ROI on the second digital image;
extracting descriptors from the key points that are invariant to scale;
matching the key points based on distances between the descriptors; and
computing a transformation based on their spatial correspondence.
5 . The apparatus of claim 1 , wherein the transformation matrix comprises a plurality of transformation parameters, wherein the plurality of transformation parameters comprises a scaling parameter for adjusting a size of an image.
6 . The apparatus of claim 1 , wherein the first magnification level is higher than the target magnification level.
7 . The apparatus of claim 1 , wherein registering the second ROI to the first ROI comprises:
receiving the first and second digital images as inputs to an optical flow model;
predicting a movement of pixels from the first digital image to the second digital image using the optical flow model; and
applying the movement of pixels to the second digital image.
8 . The apparatus of claim 1 , wherein registering the second ROI to the first ROI comprises:
detecting a failure of the registration of the second ROI to the first ROI at the target magnification level;
identifying a lower magnification level at which the registration is successful as a function of the failure;
performing a bottom-up registration process from the lower magnification level; and
deriving the second ROI on the second digital image as a function of the lower magnification level.
9 . The apparatus of claim 1 , wherein registering the second ROI to the first ROI comprises generating a visual alignment of the first and second ROIs on a digital pathology viewer at the target magnification level.
10 . The apparatus of claim 1 , wherein applying the transformation matrix comprises:
retrieving coordinate points defining a boundary of the first ROI;
performing matrix multiplication between the transformation matrix and each coordinate point; and
generating the second ROI on the second digital image using the resulting transformed coordinate points.
11 . A method for on-demand registration of whole slide images (WSIs), wherein the method comprises:
receiving, using at least a processor, at least two digital images, each comprising a pyramid structure, wherein the pyramid structure comprises:
a plurality of layers representing same image content at different magnification levels; and
a first layer having an image with a first resolution and a second layer having an image with a second resolution;
identifying, using the at least a processor, a first region of interest (ROI) on a first digital image of the at least two digital images at a target magnification;
determining, using the at least a processor, a transformation matrix as a function of at least a portion of the first digital slide image and at least a portion of a second digital image of the at least two digital images at a first magnification level corresponding to another one of the plurality of layers of the pyramid structure;
identifying, using the at least a processor, a second ROI on the second digital image based on applying the transformation matrix to the first ROI; and
registering, using the at least a processor, the second ROI to the first ROI by applying the transformation matrix at the target magnification level.
12 . The method of claim 11 , wherein the first and second digital images comprise whole slide images obtained from serially sectioned slides prepared from a common biological specimen.
13 . The method of claim 11 , wherein identifying the first region of interest (ROI) comprises:
generating a user interface displaying the first digital image at the target magnification level; and
receiving a selection of the first ROI from the user interface.
14 . The method of claim 11 , wherein determining the transformation matrix comprises:
identifying key points within the first ROI on the first digital image and the second ROI on the second digital image;
extracting descriptors from the key points that are invariant to scale;
matching the key points based on distances between the descriptors; and
computing a transformation based on their spatial correspondence.
15 . The method of claim 11 , wherein the transformation matrix comprises a plurality of transformation parameters, wherein the plurality of transformation parameters comprises a scaling parameter for adjusting a size of an image.
16 . The method of claim 11 , wherein the first magnification level is higher than the target magnification level.
17 . The method of claim 11 , wherein registering the second ROI to the first ROI comprises:
receiving the first and second digital images as inputs to an optical flow model;
predicting a movement of pixels from the first digital image to the second digital image using the optical flow model; and
applying the movement of pixels to the second digital image.
18 . The method of claim 11 , wherein registering the second ROI to the first ROI comprises:
detecting a failure of the registration of the second ROI to the first ROI at the target magnification level;
identifying a lower magnification level at which the registration is successful as a function of the failure;
performing a bottom-up registration process from the lower magnification level; and
deriving the second ROI on the second digital image as a function of the lower magnification level.
19 . The method of claim 11 , wherein registering the second ROI to the first ROI comprises generating a visual alignment of the first and second ROIs on a digital pathology viewer at the target magnification level.
20 . The method of claim 11 , wherein applying the transformation matrix comprises:
retrieving coordinate points defining a boundary of the first ROI;
performing matrix multiplication between the transformation matrix and each coordinate point; and
generating the second ROI on the second digital image using the resulting transformed coordinate points.