Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
SYSTEMS AND METHODS FOR SLIDE IMAGE ALIGNMENT
Document Type and Number:
WIPO Patent Application WO/2020/227710
Kind Code:
A1
Abstract:
Systems and methods for slide image alignment are described herein. An example method includes receiving a plurality of slide images, detecting a plurality of features contained in the slide images, and comparing a plurality of pairs of the slide images. The comparison uses the detected features. The method also includes creating a distance matrix that reflects a respective difference between each of the pairs of the slide images, creating a graph by connecting each of the slide images to its most similar slide image, and detecting a plurality of graph components. Each of the graph components includes one or more of the slide images. The method further includes aligning the slide images within each of the graph components, and aligning the graph components to form a composite image.

Inventors:
ANDERSON ALEXANDER (US)
ROBERTSON-TESSI MARK (US)
GATENBEE CHANDLER (US)
Application Number:
PCT/US2020/032321
Publication Date:
November 12, 2020
Filing Date:
May 11, 2020
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
H LEE MOFFITT CANCER CT & RES (US)
International Classes:
G06T7/00
Foreign References:
US20170091937A12017-03-30
US20160341731A12016-11-24
US20080033657A12008-02-07
Other References:
DANIEL SANCHEZ-MORILLO, GONZÁLEZ JESÚS, GARCÍA-ROJO MARCIAL, ORTEGA JULIO: "Classification of Breast Cancer Histopathological Images using KAZE features and Bag of Features", RESEARCHGATE, January 2018 (2018-01-01), Berlin Heidelberg, pages 1 - 12, XP055759895, Retrieved from the Internet [retrieved on 20200702]
Attorney, Agent or Firm:
ANDERSON, Bjorn G et al. (US)
Download PDF:
Claims:
WHAT IS CLAIMED:

1. A computer-implemented method for slide image registration, comprising:

receiving a plurality of slide images;

detecting a plurality of features contained in the slide images;

comparing a plurality of pairs of the slide images, wherein the comparison uses the detected features;

creating a distance matrix that reflects a respective difference between each of the pairs of the slide images;

creating a graph by connecting each of the slide images to its most similar slide image;

detecting a plurality of graph components, wherein each of the graph components comprises one or more of the slide images;

aligning the slide images within each of the graph components; and

aligning the graph components to form a composite image.

2. The computer-implemented method of claim 1, wherein the detected features are KAZE features.

3. The computer-implemented method of any one of claim 1 or 2, wherein comparing a plurality of pairs of the slide images comprises comparing each one of the slide images to each of the other slide images, wherein the distance matrix is created from the comparison.

4. The computer-implemented method of any one of claims 1-3, further comprising sorting the distance matrix by performing hierarchical clustering.

5. The computer-implemented method of claim 4, wherein sorting the distance matrix by performing hierarchical clustering yields a dendrogram.

6. The computer-implemented method of claim 5, wherein the dendrogram comprises a plurality of leaves, each leaf corresponding to one of the slide images.

7. The computer-implemented method of claim 6, further comprising performing optimal leaf ordering on the dendrogram.

8. The computer-implemented method of any one of claims 1-7, wherein aligning the slide images within each of the graph components comprises aligning two or more slide images within a graph component using at least one feature shared by the two or more slide images within the graph component.

9. The computer-implemented method of any one of claims 1-8, wherein aligning the graph components to form a composite image comprises:

pooling a respective set of features belonging to each of the graph components; and

aligning two or more of the graph components using the respective sets of features belonging to the two or more of the graph components.

10. The computer-implemented method of any one of claims 1-9, further comprising refining the alignment of the slide images.

11. The computer-implemented method of any one of claims 1-10, further comprising determining a transformation matrix for aligning the slide images.

12. The computer-implemented method of claim 11, wherein determining the transformation matrix comprises selecting the transformation matrix from a plurality of transformation matrices, the selected transformation matrix having the lowest alignment error.

13. The computer-implemented method of any one of claims 11 or 12, further comprising aligning one or more of the slide images using the transformation matrix.

14. The computer-implemented method of any one of claims 1-13, further comprising pre processing the slide images.

15. The computer-implemented method of claim 14, wherein pre-processing the slide images comprises:

normalizing an RGB slide image; and

converting the RGB slide image to greyscale.

16. The computer-implemented method of claim 14, wherein pre-processing the slide images comprises converting an RGB slide image into a YUV colorspace.

17. The computer-implemented method of any one of claims 1-16, wherein the slide images are whole slide images of tissue slices.

18. The computer-implemented method of claim 17, wherein the whole slide images include images of tissue slices immunostained for different markers.

19. The computer-implemented method of any one of claims 1-16, wherein the slide images are images of tissue stained with hematoxylin and eosin (H&E) stain.

20. The computer-implemented method of any one of claims 1-16, wherein the slide images are images of tissue stained with multiple colors.

21. The computer-implemented method of any one of claims 1-16, wherein the slide images are images of tissue that has undergone a plurality of stain and wash cycles.

22. The computer-implemented method of any one of claims 1-21, wherein the slide images are an unordered set of slide images.

23. A system, comprising:

a processor; and

a memory operably coupled to the processor, the memory having computer-executable instructions stored thereon that, when executed by the processor, cause the processor to:

receive a plurality of slide images;

detect a plurality of features contained in the slide images;

compare a plurality of pairs of the slide images, wherein the comparison uses the detected features;

create a distance matrix that reflects a respective difference between each of the pairs of the slide images;

create a graph by connecting each of the slide images to its most similar slide image; detect a plurality of graph components, wherein each of the graph components comprises one or more of the slide images;

align the slide images within each of the graph components; and

align the graph components to form a composite image.

24. The system of claim 23, wherein the detected features are KAZE features.

25. The system of any one of claim 23 or 24, wherein comparing a plurality of pairs of the slide images comprises comparing each one of the slide images to each of the other slide images, wherein the distance matrix is created from the comparison.

26. The system of any one of claims 23-25, wherein the memory has further computer- executable instructions stored thereon that, when executed by the processor, cause the processor to sort the distance matrix by performing hierarchical clustering.

27. The system of claim 26, wherein sorting the distance matrix by performing hierarchical clustering yields a dendrogram.

28. The system of claim 27, wherein the dendrogram comprises a plurality of leaves, each leaf corresponding to one of the slide images.

29. The system of claim 28, wherein the memory has further computer-executable instructions stored thereon that, when executed by the processor, cause the processor to perform optimal leaf ordering on the dendrogram.

30. The system of any one of claims 23-29, wherein aligning the slide images within each of the graph components comprises aligning two or more slide images within a graph component using at least one feature shared by the two or more slide images within the graph component.

31. The system of any one of claims 23-30, wherein aligning the graph components to form a composite image comprises:

pooling a respective set of features belonging to each of the graph components; and

aligning two or more of the graph components using the respective sets of features belonging to the two or more of the graph components.

32. The system of any one of claims 23-31, wherein the memory has further computer- executable instructions stored thereon that, when executed by the processor, cause the processor to refine the alignment of the slide images.

33. The system of any one of claims 23-32, wherein the memory has further computer- executable instructions stored thereon that, when executed by the processor, cause the processor to determine a transformation matrix for aligning the slide images.

34. The system of claim 33, wherein determining the transformation matrix comprises selecting the transformation matrix from a plurality of transformation matrices, the selected

transformation matrix having the lowest alignment error.

35. The system of any one of claims 33 or 34, wherein the memory has further computer- executable instructions stored thereon that, when executed by the processor, cause the processor to align one or more of the slide images using the transformation matrix.

36. The system of any one of claims 23-35, wherein the memory has further computer- executable instructions stored thereon that, when executed by the processor, cause the processor to pre- process the slide images.

37. The system of claim 36, wherein pre-processing the slide images comprises:

normalizing an RGB slide image; and

converting the RGB slide image to greyscale.

38. The system of claim 36, wherein pre-processing the slide images comprises converting an RGB slide image into a YUV colorspace.

39. The system of any one of claims 23-38, wherein the slide images are whole slide images of tissue slices.

40. The system of claim 39, wherein the whole slide images include images of tissue slices immunostained for different markers.

41. The system of any one of claims 23-38, wherein the slide images are images of tissue stained with hematoxylin and eosin (H&E) stain.

42. The system of any one of claims 23-38, wherein the slide images are images of tissue stained with multiple colors.

43. The system of any one of claims 23-38, wherein the slide images are images of tissue that has undergone a plurality of stain and wash cycles.

44. The system of any one of claims 23-43, wherein the slide images are an unordered set of slide images.

Description:
SYSTEMS AND METHODS FOR SLIDE IMAGE ALIGNMENT

CROSS-REFERENCE TO RELATED APPLICATIONS

[0001] This application claims the benefit of U.S. provisional patent application No.

62/845,585, filed on May 9, 2019, and entitled "SYSTEMS AND METHODS FOR SLIDE IMAGE

REGISTRATION," the disclosure of which is expressly incorporated herein by reference in its entirety.

STATEMENT REGARDING FEDERALLY FUNDED RESEARCH

[0002] This invention was made with government support under Grant no. CA143970 and CA193489 awarded by the National Cancer Institute. The government has certain rights in the invention.

BACKGROUND

[0003] Aligning immunohistochemistry (IHC) is challenging for one or more of the following reasons: (1) the intensity of each pixel is different across slide images due to varying spatial distributions of the cells that carry the markers stained for; (2) the shape of the tissue changes as one moves "through" the sample; (3) samples may be distorted due to tearing or folding; and/or (4) the order of slices may not be known. Conventional methods tend to focus on small regions of interest (ROI), single stains, or a limited number of slides.

SUMMARY

[0004] Systems and methods for slide image alignment are described herein. An example computer-implemented method for slide image registration is described herein. The method includes receiving a plurality of slide images, detecting a plurality of features contained in the slide images, and comparing a plurality of pairs of the slide images. The comparison uses the detected features. The method also includes creating a distance matrix that reflects a respective difference between each of the pairs of the slide images, creating a graph by connecting each of the slide images to its most similar slide image, and detecting a plurality of graph components. Each of the graph components includes one or more of the slide images. The method further includes aligning the slide images within each of the graph components, and aligning the graph components to form a composite image.

[0005] Optionally, the detected features are KAZE features.

[0006] Alternatively or additionally, the step of comparing a plurality of pairs of the slide images includes comparing each one of the slide images to each of the other slide images. The comparison is used to create the distance matrix.

[0007] Optionally, the method further includes sorting the distance matrix by performing hierarchical clustering, for example, to yield a dendrogram. The dendrogram includes a plurality of leaves, each leaf corresponding to one of the slide images. Optionally, the method further includes performing optimal leaf ordering on the dendrogram.

[0008] Alternatively or additionally, the step of aligning the slide images within each of the graph components includes aligning two or more slide images within a graph component using at least one feature shared by the two or more slide images within the graph component.

[0009] Alternatively or additionally, the step of aligning the graph components to form a composite image includes pooling a respective set of features belonging to each of the graph components, and aligning two or more of the graph components using the respective sets of features belonging to the two or more of the graph components.

[0010] Alternatively or additionally, the method optionally further includes refining the alignment of the slide images.

[0011] Alternatively or additionally, the method further includes determining a transformation matrix for aligning the slide images. The step of determining the transformation matrix optionally includes selecting the transformation matrix from a plurality of transformation matrices, the selected

transformation matrix having the lowest alignment error. The method can further include aligning one or more of the slide images using the transformation matrix.

[0012] Alternatively or additionally, the method further includes pre-processing the slide images. In some implementations, the step of pre-processing the slide images can include normalizing an RGB slide image, and converting the RGB slide image to greyscale. In other implementations, the step of pre-processing the slide images can include converting an RGB slide image into a YUV colorspace.

[0013] Optionally, the slide images are whole slide images of tissue slices. Alternatively or additionally, the whole slide images include images of tissue slices immunostained for different markers. Alternatively or additionally, the slide images are images of tissue stained with hematoxylin and eosin (H&E) stain. Alternatively or additionally, the slide images are images of tissue stained with multiple colors. Alternatively or additionally, the slide images are images of tissue that has undergone a plurality of stain and wash cycles.

[0014] Optionally, the slide images are an unordered set of slide images.

[0015] It should be understood that the above-described subject matter may also be implemented as a computer-controlled apparatus, a computer process, a computing system, or an article of manufacture, such as a computer-readable storage medium.

[0016] Other systems, methods, features and/or advantages will be or may become apparent to one with skill in the art upon examination of the following drawings and detailed description. It is intended that all such additional systems, methods, features and/or advantages be included within this description and be protected by the accompanying claims.

BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The components in the drawings are not necessarily to scale relative to each other. Like reference numerals designate corresponding parts throughout the several views.

[0018] FIGU RE 1A is a flowchart illustrating a method for aligning slide images according to an implementation described herein. FIGURE IB is a flowchart illustrating another method for aligning slide images according to an implementation described herein.

[0019] FIGU RE 2 is an example computing device.

[0020] FIGU RE 3 is a table including the alignment accuracy of a slide alignment method (i.e., VALIS) according to an implementation described herein. [0021] FIGU RES 4A is a graph illustrating the comparison of the accuracy of VALIS (auto) versus aligning by hand (manual). FIGURE 4B is are graphs illustrating the alignment accuracy of different data sets.

[0022] FIGU RE 5 is a table including definitions for variables used in the description of an example method (i.e., VALIS) according to an implementation described herein.

DETAILED DESCRIPTION

[0023] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. Methods and materials similar or equivalent to those described herein can be used in the practice or testing of the present disclosure. As used in the specification, and in the appended claims, the singular forms "a," "an," "the" include plural referents unless the context clearly dictates otherwise. The term "comprising" and variations thereof as used herein is used synonymously with the term "including" and variations thereof and are open, non limiting terms. The terms "optional" or "optionally" used herein mean that the subsequently described feature, event or circumstance may or may not occur, and that the description includes instances where said feature, event or circumstance occurs and instances where it does not. Ranges may be expressed herein as from "about" one particular value, and/or to "about" another particular value. When such a range is expressed, an aspect includes from the one particular value and/or to the other particular value. Similarly, when values are expressed as approximations, by use of the antecedent "about," it will be understood that the particular value forms another aspect. It will be further understood that the endpoints of each of the ranges are significant both in relation to the other endpoint, and independently of the other endpoint.

[0024] Tumor biopsies are often cut into a series of very thin slices, each of which is placed upon a slide. Stains may be applied to each slice, revealing the different cell types within the slice.

Knowledge of the spatial location of cell types can be highly informative, as the location reveals how cells are interacting with one another, and/or if cells are isolated to certain regions of the tumor. Unfortunately, the location and orientation of the slices often varies across the slides upon which the slices are placed. As such, conducting a spatial analysis is only possible if the slices have been aligned in space. This would be extremely tedious to do manually. The technique described herein provides a solution that overcomes one or more of the difficulties noted above. The technique described herein provides an automated way in which to align the slices. The technique can be used align images of any size, from small pieces of tissue to the whole slice. The technique is also able to align a large number of serial slices, potentially allowing for three-dimensional (3D) reconstruction of the tumor. Further, the technique is able to align slices which have been stained for different cell types, allowing one to get a better picture of the cellular composition of the tumor. Given these features, the technique enables one to conduct a spatial analysis and/or reconstruct the tumor in 3D.

[0025] An example method for performing whole slide image registration (WISR) for immunohistochemistry (IHC) is described herein. An example method for analyzing slide images is also described herein. The method can include aligning a plurality of slide images to form a composite image. Alternatively or additionally, the method can further include slicing the composite image into a plurality of quadrats, analyzing each of the quadrats, and estimating spatial interactions between cell types within the slide images. Alternatively or additionally, the method can further include creating a distance matrix using ecological distances to compare a region of interest (ROI) across tumors. Alternatively or additionally, the method can further include clustering on the distance matrix to identify a hidden structure in the composite image. Alternatively or additionally, the method can further include performing a

multidimensional analysis on the distance matrix.

[0026] Referring now to Fig. 1A, an example method for aligning slide images is shown. This disclosure contemplates that the method can be performed using a computing device, for example, computing device 200 of Fig. 2. An automated software tool that aligns a series of whole slide tissue image slices, immunostained for different markers is described below. The algorithm can include the following series of sequential steps:

[0027] Step 101 - Feature Detection and Matching: The features of each image are detected. Using these features, each image compared to all other images in the series by feature matching. [0028] Step 102 - Slide Ordering: Comparisons are used to build a distance matrix, D, reflecting the differences between each pair of images. Hierarchical clustering is performed on D, yielding a dendrogram. The leaves of the dendrogram, each corresponding to an image, are then optimally ordered. This order determines the position of the image in aligned image stack.

[0029] Step 103 - Community Alignment: A graph with images as vertices, and edges connecting the most similar images, is created to perform the alignment. Communities are detected, and then images in each community are aligned to one another. This is followed by stitching the communities together. Community Stitching: The features of each community are pooled, and then images in each community are aligned to the images in the previous community by matching pooled features. Positions of matching features are then used find that transformation matrix that will warp images to those in the previous community.

[0030] Step 104 - Registration: Images are now stacked and aligned. Dense optical flow is used to refine the alignment of each image to the previous image in the stack.

[0031] Step 105 -Result: The transformation matrices found during this process can be used to align the original, unprocessed, versions of the images. The transformation matrices can also be scaled to work on resized (smaller or larger) versions of these images.

[0032] Referring now to Fig. IB, another example method for slide image registration is shown. This disclosure contemplates that the method can be performed automatically using a computing device such as computing device 200 of Fig. 2. This process is also described below in Example 2 (i.e., the VALIS technique). At step 122, a plurality of slide images are received, for example at a computing device. In some implementations, the slide images are whole slide images of tissue slices, for example, whole slide images that include images of tissue slices immunostained for different markers. Alternatively or additionally, the slide images are images of tissue stained with hematoxylin and eosin (H&E) stain.

Alternatively or additionally, the slide images are images of tissue stained with multiple colors.

Alternatively or additionally, the slide images are images of tissue that has undergone a plurality of stain and wash cycles. Optionally, in some implementations, the slide images are pre-processed so that the slide images look as similar as possible. The slide images can be processed to have a black background and lighter foreground highlighting tissue features. For example, in some implementations, the step of pre processing the slide images can include normalizing an RGB slide image, and converting the RGB slide image to greyscale. In other implementations, the step of pre-processing the slide images can include converting an RGB slide image into a YUV colorspace. Alternatively or additionally, the slide images are optionally an unordered set. It should be understood that the pre-processing techniques described above are provided only as examples and that other techniques can be used.

[0033] At step 124, a plurality of features contained in the slide images are detected.

Optionally, the detected features are KAZE features (e.g., F; in the VALIS technique described below). KAZE features are detected using a two-dimensional feature detection and description algorithm known in the art. Although KAZE features are provided as an example, this disclosure contemplates that the detected features can be other than KAZE features. At step 126, a plurality of pairs of the slide images are compared. The comparison uses the detected features. For example, the step of comparing a plurality of pairs of the slide images includes comparing each one of the slide images to each of the other slide images. At step 128, a distance matrix (e.g., , n X n distance matrix, D in the VALIS technique described below) that reflects a respective difference between each of the pairs of the slide images is created. Optionally, if the slide images are an unorder set (i.e., slide series is unknown), the method further includes sorting the distance matrix by performing hierarchical clustering, for example, to yield a dendrogram. The dendrogram includes a plurality of leaves, each leaf corresponding to one of the slide images. Optionally, the method further includes performing optimal leaf ordering on the dendrogram.

[0034] At step 130, a graph (e.g., undirected graph G(V, E) in the VALIS technique described below ) is created by connecting each of the slide images to its most similar slide image. At step 132, a plurality of graph components (e.g., community C m in the VALIS technique described below) is detected. This disclosure contemplates using community detection techniques known in the art. Such techniques are well known in the art and not described in further detail herein. Additionally, at step 134, the slide images within each of the graph components are aligned. The step of aligning the slide images within each of the graph components includes aligning two or more slide images within a graph component using at least one feature shared by the two or more slide images within the graph component. Further, at step 136, the graph components are aligned to form a composite image. The step of aligning the graph components to form a composite image includes pooling a respective set of features belonging to each of the graph components (e.g., composite feature set composed of all features in the community, F m = F™ U ™ U F™... for each community C m in the VALIS technique described below), and aligning two or more of the graph components using the respective sets of features belonging to the two or more of the graph components. Alternatively or additionally, a final alignment can be performed, for example by aligning each slide images to its previous slide image, to form the composite image. Alternatively or additionally, the alignment of the slide images can optionally be refined. The alignment can be refined using dense optical flow. This disclosure contemplates using optical flow techniques known in the art. Such techniques are well known in the art and not described in further detail herein. It should be understood that this disclosure contemplates using other refinement algorithms including, but not limited to, deformable registration methods.

[0035] As discussed below, the slide images can be aligned using a transformation matrix (e.g., transformation matrix, M in the VALIS technique described below). For example, a transformation matrix for aligning the slide images can be determined. The step of determining the transformation matrix optionally includes selecting the transformation matrix from a plurality of transformation matrices, the selected transformation matrix having the lowest alignment error.

[0036] The techniques described above have successfully been used to align serial slices of multi-color immunohistochemistry, images of the same tissue that have undergone serval stain/wash cycles, and tumor microarrays with low error. This disclosure contemplates that the techniques can be used clinically, for example, as a pathologists' tool for diagnostic purposes. In other words, this disclosure contemplates that the composite image (e.g., the aligned slide images) can optionally be further analyzed, for example, for diagnostic purposes. As an example, the composite image (e.g., the aligned slide images) may be used to assess the amount, and composition of, immune infiltrate into at tumor. Further, this digital pathology tool can also be used to compare tumor ecologies and spatial associations across groups, such as primary versus metastases, responders versus non-responders, grade, subtype, etc. Techniques and/or algorithms for digital pathology are known in the art and are therefore not described in further detail herein.

[0037] Example Computing Device

[0038] It should be appreciated that the logical operations described herein with respect to the various figures may be implemented (1) as a sequence of computer implemented acts or program modules (i.e., software) running on a computing device (e.g., the computing device described in Fig. 2), (2) as interconnected machine logic circuits or circuit modules (i.e., hardware) within the computing device and/or (3) a combination of software and hardware of the computing device. Thus, the logical operations discussed herein are not limited to any specific combination of hardware and software. The

implementation is a matter of choice dependent on the performance and other requirements of the computing device. Accordingly, the logical operations described herein are referred to variously as operations, structural devices, acts, or modules. These operations, structural devices, acts and modules may be implemented in software, in firmware, in special purpose digital logic, and any combination thereof. It should also be appreciated that more or fewer operations may be performed than shown in the figures and described herein. These operations may also be performed in a different order than those described herein.

[0039] Referring to Fig. 2, an example computing device 200 upon which embodiments of the invention may be implemented is illustrated. It should be understood that the example computing device 200 is only one example of a suitable computing environment upon which embodiments of the invention may be implemented. Optionally, the computing device 200 can be a well-known computing system including, but not limited to, personal computers, servers, handheld or laptop devices, multiprocessor systems, microprocessor-based systems, network personal computers (PCs), minicomputers, mainframe computers, embedded systems, and/or distributed computing environments including a plurality of any of the above systems or devices. Distributed computing environments enable remote computing devices, which are connected to a communication network or other data transmission medium, to perform various tasks. In the distributed computing environment, the program modules, applications, and other data may be stored on local and/or remote computer storage media. [0040] In its most basic configuration, computing device 200 typically includes at least one processing unit 206 and system memory 204. Depending on the exact configuration and type of computing device, system memory 204 may be volatile (such as random access memory (RAM)), non-volatile (such as read-only memory (ROM), flash memory, etc.), or some combination of the two. This most basic configuration is illustrated in Fig. 2 by dashed line 202. The processing unit 206 may be a standard programmable processor that performs arithmetic and logic operations necessary for operation of the computing device 200. The computing device 200 may also include a bus or other communication mechanism for communicating information among various components of the computing device 200.

[0041] Computing device 200 may have additional features/functionality. For example, computing device 200 may include additional storage such as removable storage 208 and non-removable storage 210 including, but not limited to, magnetic or optical disks or tapes. Computing device 200 may also contain network connection(s) 216 that allow the device to communicate with other devices.

Computing device 200 may also have input device(s) 214 such as a keyboard, mouse, touch screen, etc. Output device(s) 212 such as a display, speakers, printer, etc. may also be included. The additional devices may be connected to the bus in order to facilitate communication of data among the components of the computing device 200. All these devices are well known in the art and need not be discussed at length here.

[0042] The processing unit 206 may be configured to execute program code encoded in tangible, computer-readable media. Tangible, computer-readable media refers to any media that is capable of providing data that causes the computing device 200 (i.e., a machine) to operate in a particular fashion. Various computer-readable media may be utilized to provide instructions to the processing unit 206 for execution. Example tangible, computer-readable media may include, but is not limited to, volatile media, non-volatile media, removable media and non-removable media implemented in any method or technology for storage of information such as computer readable instructions, data structures, program modules or other data. System memory 204, removable storage 208, and non-removable storage 210 are all examples of tangible, computer storage media. Example tangible, computer-readable recording media include, but are not limited to, an integrated circuit (e.g., field-programmable gate array or application- specific 1C), a hard disk, an optical disk, a magneto-optical disk, a floppy disk, a magnetic tape, a holographic storage medium, a solid-state device, RAM, ROM, electrically erasable program read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices.

[0043] In an example implementation, the processing unit 206 may execute program code stored in the system memory 204. For example, the bus may carry data to the system memory 204, from which the processing unit 206 receives and executes instructions. The data received by the system memory 204 may optionally be stored on the removable storage 208 or the non-removable storage 210 before or after execution by the processing unit 206.

[0044] It should be understood that the various techniques described herein may be implemented in connection with hardware or software or, where appropriate, with a combination thereof. Thus, the methods and apparatuses of the presently disclosed subject matter, or certain aspects or portions thereof, may take the form of program code (i.e., instructions) embodied in tangible media, such as floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium wherein, when the program code is loaded into and executed by a machine, such as a computing device, the machine becomes an apparatus for practicing the presently disclosed subject matter. In the case of program code execution on programmable computers, the computing device generally includes a processor, a storage medium readable by the processor (including volatile and non-volatile memory and/or storage elements), at least one input device, and at least one output device. One or more programs may implement or utilize the processes described in connection with the presently disclosed subject matter, e.g., through the use of an application programming interface (API), reusable controls, or the like. Such programs may be implemented in a high level procedural or object-oriented programming language to communicate with a computer system. However, the program(s) can be implemented in assembly or machine language, if desired. In any case, the language may be a compiled or interpreted language and it may be combined with hardware implementations.

[0045] Examples [0046] Example 1

[0047] The method (e.g., algorithm) described above with regard to Fig. 1A has successfully been used to align serial slices for several data sets with low error. This disclosure contemplates using the algorithm clinically as a pathologists' tool for diagnostic purposes. Further, this digital pathology tool can also be used to compare tumor ecologies and spatial cell-cell interactions across groups, such as primary vs metastases, responders vs non-responders, grade, subtype, etc.

[0048] For example, the method described above has successfully been used to align serial slices for several data sets with low error, where error is distance between matched features in the current slide and the previous slide (if alignment was perfect, these feature positions would be in exactly the same spots):

[0049] la) 30 colorectal adenoma whole mount biopsies, each with 7 dual-stained slides, each approximately 2um in thickness. The width and height of the images is 914px and 408px, with a median error of 2.1 pixels. The results were used to align larger versions of the images with widths and heights of 104568px and 234042px.

[0050] lb) 15 colorectal adenoma whole mount biopsies, each with 7 dual-stained slides, each approximately 2um in thickness. The width and height of the images is 914px and 408px, with a median error of 2.5 pixels. The results were used to align larger versions of the images with widths and heights of 104568px and 234042px.

[0051] lc) 48 ductal carcinoma in situ (DCIS) whole mount biopsies, each with 7 dual-stained slides, each approximately 2um in thickness. The width and height of the images is 914px and 408px, with a median error of 2.3 pixels. The results were used to align larger versions of the images with widths and heights of 104568px and 234042px.

[0052] lc) 48 DCIS whole mount biopsies, each with 7 dual-stained slides, each approximately 2um in thickness. The width and height of the images is 914px and 408px, with a median error of 2.3 pixels. The results were used to align larger versions of the images with widths and heights of 104568px and

234042px. [0053] Id) 3 oral cancer tumor microarrays (TMA), each with 9 single-stained slides. The width and height of the images is 632px and 837px, with a median error of 5 pixels.

[0054] le) 1 breast cancer tumor microarrays (TMA), with 2 single-stained slides. The width and height of the images is 632px and 837px, with a median error of 0.8 pixels.

[0055] If) 1 region of interest within a renal tissue sample that had 39 single-stained slides of different sizes. The median width and height of the images is 300px and 194px, with a median error of 1.8 pixels. The results were used to align larger versions of the images with widths and heights of 505px and 300px.

[0056] lg) 1 DCIS whole mount biopsy that had 13 single stained slides, each slice being approximately 20um apart. The median width and height of the images is 651px and 483px, with a median error of 4.3 pixels. The results were used to align larger versions of the images with widths and heights of 26033px and 19334px.

[0057] 2) For the DCIS whole mount biopsy, with 13 slides, the method has been shown to be more accurate than aligning images by hand. The median error rate for aligning by hand is 5.1px, while with a median error using this automated method is 4.3 pixels.

[0058] 3) The method has successfully determined the correct order of the renal tissue sample set that had 38 slides. It has also determined the correct order of a DCIS dataset that has 72 serial slices.

[0059] 4) The method has been used to use isolate region of interests across all slices in the series. This is accomplished by drawing a mask on 1 image, and using information for the alignment to apply the mask to each original image.

[0060] Example 2

[0061] A method, Virtual Alignment of pathoLogy Image Series (VALIS), is described in the example below. VALIS is able to align not only ROI, but whole mount biopsies, and tumor microarrays

(TMA), all at full resolution. VALIS is also capable of not only aligning images stained with H+E, but also samples stained for multiple, spatially varying, markers. Furthermore, for large series of images, VALIS does not require that the images be ordered, as the technique is able to optimally order the slides, often times in the same order they were sliced from the sample. VALIS is also a totally automated and adaptive pipeline. All that is required is a set of pre-processed images, and the results are aligned images and collection of transformation matrices that can be used to align the image sets.

[0062] One application of VALIS is in the 3D reconstruction of samples. Additionally, the ability to align a series of slices stained for different markers, which is another application for VALIS, is even more powerful, as it creates the opportunity to describe the tumor ecology while maintaing spatial structure. Once aligned, established spatial statistics commonly used in other fields, such as ecology and

demography, can be used to describe and better understand the tumor microenvironment. Thus, VALIS facilitates novel analyses of the tumor ecology that potentially identify crucial interactions involved in oncogenesis.

[0063] Mass cytometry is an exciting method that makes it possible to study the spatial distribution of different cell types and their interactions. While more accurate, mass cytometry does have its drawbacks: it is currently very expensive and thus potentially has a limited user base; it is typically used for small regions of tumors, such as a core from a TMA. VALIS, on the other hand, does not have these limitations, as it can be used to align the whole tumor. Perhaps even more importantly, VALIS can applied to existing datasets, which is useful because it may be that the samples of interest no longer exist, and thus cannot be multiplexed with mass cytometry. Further, VALIS can be used to define the whole tumor, not only small regions.

[0064] VALIS overcomes the challenges of working with large unordered image sets that have a wide variety of stains by performing the alignments on small groups of similar images, and then stitching those groups together in an optimal order. Given a set of greyscale preprocessed images (made to look as similar as possible), VALIS first detects the KAZE features of each image , and then determines the similarity/difference between each pair of images by matching their features, creating a distance matrix, D. If the order of slicing is unknown, hierarchical clustering is then performed on D, generating a dendrogram T. The order of slices is then be inferred by optimally ordering the leaves of T such that most similar images are adjacent to one another in the series.

[0065] The image series is broken up into small groups of similar image by performing community detection on the nearest neighbor graph G, where each image (i.e. a vertex in G) has an edge between it and its most similar image. Within each community, images are aligned to the subset of features shared by all images in that community. Next, each community is stitched to the previous community using the full set of features in each community. At this point the images are roughly aligned, and optical flow is used to refine the alignment between each image and the previous image in the series.

[0066] The output of VALIS is a transformation matrix for each image that aligns it to the previous image in the series. Such matrices can be scaled to work on images of different sizes, meaning that VALIS can quickly find the matrices using small versions of the images, and the resulting matrices scaled to align much larger, higher resolution, copies of the images. Given a set of reference coordinates, it is also possible to use the transformation matrices to slice out aligned regions from the very large (e.g., 8 gigabyte (GB) size or more) images produced by microscopes. Thus, VALIS gives one the ability to align and analyze the tumor at whatever the desired resolution.

[0067] VALIS was tested on datasets representing several common scenarios: series of H+E, multi-color IHC, whole mount biopsies, small ROI, sets where the slices are thin and close together, sets where the slides are thick and far apart, sets where different individuals conducted the staining on different slices in the same image series. The accuracy of VALIS was assessed by calculating the Euclidean distance between matching features in each image and its previous image in the series. If the images are perfectly aligned, this distance, i.e. error, would be 0. Errors can be calculated using the median distance between the 25 best matching features the across the two images (taking the top number avoids including outliers that may have minimal impact on the alignment), or the average displacement between the overlapping areas of the two images, as measured by dense optical flow. The ability of VALIS to optimally order slides was tested by taking an image set in which the slice order is known, shuffling the images, and the comparing the order estimated by VALIS to the known order.

[0068] The error rate of VALIS is low, often being well below 5 pixels (see the table in Fig. 3 and Figs. 4A and 4B), and has been shown to be more accurate than aligning by hand (see Fig. 4A).

[0069] Fig. 4A illustrates the comparison of the accuracy of VALIS (auto) versus aligning by hand (manual). The distance between matching features and the previous image in the series. In this image set, VALIS has lower error than when the same set of images are aligned by hand. Fig. 4A illustrates the alignment accuracy for different datasets. Y is the distance between matching features in each image and its previous image in the series. If alignments are perfect this value would be 0. 30 colorectal adenoma (CRA) whole mount biopsies, each with 7 dual-stained slides, each approximately 2um in thickness. The dimensions of the images used to calculate error is 408x914 pixels. 15 colorectal carcinoma (CRC) whole mount biopsies, each with 7 dual-stained slides, each approximately 2um in thickness. The dimensions of the images used to calculate error is 408x914 pixels. 48 ductal carcinoma in situ (DCIS) whole mount biopsies, each with 7 dual-stained slides, each approximately 2um in thickness. The dimensions of the images used to calculate error is 408x914 pixels. 3 oral cancer tumor microarrays (TMA), each with 9 single-stained slides. The dimensions of the images used to calculate error is 632x 837.

[0070] Ecological analysis. Distance matrix may reveal hidden structure, including, but not limited to, separating responders versus non-responders or how the tumors as wholes are different across tumor types.

[0071] Preprocessing:

[0072] The input to VALIS is a set of processed images. As KAZE features are used, these images should be greyscale, but may need to have additional modifications. The exact preprocessing steps will likely depend on the set of images, but two methods that have worked well with the test datasets are described below. However, the goal of the pre-processing step should be take make the images look as similar as possible and have a black background and lighter foreground highlighting tissue features.

[0073] The first method is to normalize each channel of the RGB image (truecolor image). This disclosure contemplates using RGB normalization techniques known in the art. Such techniques are well known in the art and not described in further detail herein. An example RGB normalization method is described in Wang et al., Robust image registration of biological microscopic images, Scientific Reports, 4:6050 EP, 2014. The normalized channels can then be recombined to create a normalized RGB image. This normalized RGB image is then converted to greyscale and optionally subjected to histogram equalization.

[0074] A second method is the convert the RGB image (truecolor image) to YUV colorspace, and then add the absolute values of the U and V channels. This disclosure contemplates using RGB to YUV conversion techniques known in the art. Such techniques are well known in the art and not described in further detail herein. The reasoning behind this method is to bring all pixels with color to the foreground, and push all greyscale pixels (e.g., those associated with empty areas of the slide or dust, dirt, etc...) to the background.

[0075] No matter the preprocessing method, the images provided to VALIS should not be too large. However, the transformation matrices found using the smaller images can be scaled to work on the full size images. Since this is based on feature matching, many motion models can be estimated, including, but not limited to, Euclidean, similarity, affine, or perspective.

[0076] Feature Detection:

[0077] The first step of the alignment pipeline is to detect the KAZE features of each image /;, denoted by i . Each feature in the image has an original location of F i (x, y), but these positions change throughout the alignment processes. More specifically, the positions will change a total of four times: first when padding the image, moving the features (x, y); next when aligning the features in each

community, moving the features to (x, y); they are then again moved when the communities are stitched

together, being warped to (x, y); arriving at their final location after refining the alignment. Note that the

dot decorators indicate how many transformations the image and its features have undergone.

[0078] Build Distance Matrix:

[0079] The next step is to create a symmetric, hollow, n X n distance matrix, D, based on matching KAZE features between each pair of images. These distances, and associated similarities, are then used to optimally order the images and to build a graph of similar images. Brute force matching with crosschecking and random sample consensus (RANSAC) is used to match each feature F i to the other feature F j . Information from from these matches is then used to fill in D and quantify the similarity between images. Multiple distance/similarity metrics exist, but the best success has been had using either the number of matches, a, or Euclidean distance between F i and F j . If using the number of matches, then j = a simiarlty between the two images, is just the number of matches, while distance If using

Euclidean distances, then where k is the index of matching features, and

[0080] Optimally Order Images:

[0081] For datasets where the order of the series is known, then this step (i.e., image ordering) can be skipped. Otherwise, for datasets where the order of the series is unknown, or not particularly important, then the following steps are used to optimally order the images based on their similarity. Hierarchical clustering using single linkage is performed on the distance matrix, yielding a dendrogram, T. The leaves of T each correspond to an image in / and can be ordered such that similarity of adjacent leaves is maximized. Assuming that each tissue slice is more similar to the slice immediately above/below than to slices further away, this process recovers the same order in which the serial slices were taken. Thus, given f, the optimal order of the leaves of T, the images can be ordered such that the similarity of adjacent images is maximized, yielding the sorted collection of images.

[0082] Construct Graph and Detect Communities:

[0083] Next, an undirected graph G(V, E) is constructed by connecting each image to its nearest neighbor in feature space. That is, each vertex in V(G) corresponds to an image and its feature set, with an edge between each image and its most similar image. In other words, there is an edge between image /; and the image I j associated with the maximum S ij . The edge weights of this graph are equal to the similarity of the two images.

[0084] Community detection is then performed on G(V, E). This disclosure contemplates using community detection techniques known in the art. Such techniques are well known in the art and not described in further detail herein. An example community detection method is described in Blondel et al., Fast Unfolding of Communities in Large Networks, 2008. This disclosure contemplates using other methods of community detection, and the method does not seem to be too sensitive to the exact method chosen. Following community detection, each V i (G), and the associated I i and F i , is assigned to its community, m. These communities are used to perform subsets of alignments, and then all communities stitched together in series.

[0085] Pad Images:

[0086] By this point, the order of images and their communities assignments have been determined. Given this structure, the process of finding the transformation matrices can begin. To avoid cropping, the first step is to estimate the dimensions of an image that can accommodate all warped images, and find the translation matrix that will pad each image to fit within those dimensions. This can be estimated by finding the maximum width and height of each image if it had been rotated 45 degrees, the amount of rotation that would most increase either dimension. For each image, its width and height after 45 degree rotation is W i Cos(45) + h i sin(45) and W i sin(45) + h i Cos(45), where w i and h i are the width and height of the un-rotated image, respectively. Therefore, w max and h max are the maximum width and height given these possible rotations. The translation that pads each image is then shown as:

[0087] After padding the image, the features have been shifted, which can be expressed as (F i (x, y), P i ) ® F i (x, y), where y / ((x, y), M) indicates warping points ( x, y ) using some transformation matrix, M. For simplicity, Y will be used to indicate warping of feature points F i (x, y) or the I i itself.

[0088] Community Alignment:

[0089] The alignments can be performed in small batches using the communities detected as described above. The goal of this step is find features common to all images in community C m , and then align all community members to those shared features. Doing this ensures that all images are aligned to the same set of points while also removing spurious matches by finding only those features common to all community members.

[0090] For each community C m , all images are aligned to features in the single image that has the greatest median similarity to all other images in the community. This image may be considered the community's training image, and is denoted as . The training features used for alignments are the subset

of features associated with that all other images have matches with. In otherwords, the common

feature set of the community is ...The matches between each F; and F can then be used to find the transformation matrix, , that aligns image to the community training image, Flowever, when finding it is necessary to use the shifted positions of the features, .

[0091] This transformation can be combined with the translation matrix found earlier, so that transformation aligns the images within an image with dimensions large enough to avoid cropping. This creates the transformation matrix which has the same effect of padding the image and then

applying the rigid affine transformation to align the images in the community. The position of each image's features after padding and community alignment is thus y (F(x, y

[0092] Community Stitching:

[0093] Given the order of slides, f , determined as described above, it is possible to stitch each community to the previous community in the series. This is accomplished by building a composite feature set composed of all features in the community, ... for each community C m . Next, the

composite feature set F m is matched to F m- 1 , using RANSAC and cross-checking to remove poor matches.

[0094] At this point, the images in each community are aligned to one another, and thus the features are all be in similar positions. Therefore, the matrix that warps features in F m to align with

those in F m- 1 can be found using the positions of all features that match across the two communities. A special case is C which is essentially being aligned to itself, and so is the identity matrix. is then applied to every member of the community, aligning each feature in C m to the features in C m -1

[0095] The position of the warped features after community stitching is denoted by (x, y).

Following stitching, the previous image's features have moved from where they were after community alignment, and so  m is estimated using (x, y) and m- x, y).

[0096] As before, the transformation matrices can be combined to have the same effect of padding the image, aligning it within its community, and then aligning it to the previous community. This is accomplished with Therefore, warps the original features to align

with the images in its community and the previous aligned community.

[0097] Refining the Alignment:

[0098] When following the order of images defined by F as described above, warping each image I i with its yield s , and thus a series of roughly aligned images. The alignment of each

image to the previous image in the series can be refined using dense optical flow, which estimates the displacement, ( dx , dy), from the previous image, , to the current image, . This disclosure

contemplates using optical flow techniques known in the art. Such techniques are well known in the art and not described in further detail herein. An example technique is DeepFlow. It should be understood that this disclosure contemplates using dense optical flow algorithms other than DeepFlow. The transformation matrix can then be estimated by finding the transformation that maps ( x, y ) ® (x— dx, y— dy). After

being warped, the final aligned image is denoted as i.e, As each previous image in the

series has been warped, is found by determing the displacement between , not . The

final transformation matrix that aligns is thus which is equivalent to padding the image,

aligning it within its community, stitching it to the images in the previous community, and then refining its alignment to the previous image in the series.

[0099] Warping:

[00100] The transformation matrices estimated by VALIS can be scaled to work on resized copies of the images. For example, it is useful to find the matrices using smaller versions of the images, and then scale the transformation matrices to work on the larger image that needs to be aligned. This scaled transformation matrix can be found as S i -A i S i -1 , where S i = and s x and s y are the scaling

factors between I i and the resized copy of the image.

[00101] Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.