1. Field
Virtual microscopy and other system may benefit from a system that can build the large mosaic by stitching images, and overcoming positioning error of stages used to provide the images. In particular, these systems may benefit from scan order optimization and virtual slide stitching techniques.
2. Description of the Related Art
Virtual microscopy is a method that is used to provide a digital representation of an entire slide, although when inspecting samples, such as biological samples, with optical microscope, only small part of a sample is typically visualized at a time. To generate a virtual slide out of the sample on a glass slide, an automatic microscope system can scan the entire slide and capture images from all sites, and compose these images into a large mosaic.
To obtain a digital image of a large sample under a microscope, where the sample is much larger than the FOV of the microscope, multiple images can be taken and then combined to form a single sample image. To combine the single FOV images, there is typically some overlap so that portions of the images can be matched and aligned for the combination process. Since the samples may be of random shape and size, it can occur during the scanning process that a single image may not have a portion of the sample (image data or pixels with sample information) in the overlap area for the matching and aligning (stitching) process. In order to accomplish correct stitching the system can put all incoming images into a temporary container and continue the stitching when the appropriate images will arrive. Such an approach can significantly slow down the throughput.
A virtual slide system may impose requirements such as to scan and generate output data for a sample area of 2.25 square centimeters in 20× magnification in one minute. As the field of view (FOV) is 750×750 micron and typical overlap is 10% of the net size of each image, the unique portion of the image may be 675×675 micron. Thus, 490 sites may be used to cover the whole sample. Each site image may be approximately 12 Mb. Consequently, when scanning a full slide, 50 mm×25 mm, in high magnification the number of sites can be greater than 10000 sites per scan.
According to certain embodiments, a method includes analyzing, by a machine, a low resolution image of a sample. The method also includes determining, by the machine, a scan pattern for the sample based on analysis of the low resolution image of the sample. The method further includes controlling, by the machine, the scan based on the scan pattern, wherein the scan pattern is configured to minimize an amount of back-stitching of scans in the scan pattern.
A method, in certain embodiments, includes generating, by a machine, strips corresponding to edges of an image to be stitched with another image to form a composite image. The method also includes storing the strips in a strip repository. The method further includes moving, by the machine, the image to a full image repository. The method additionally includes processing tiles from a tiles repository, wherein the tiles include at least one tile obtained from the image.
An apparatus, according to certain embodiments, includes a low resolution analysis section configured to analyze a low resolution image of a sample. The apparatus also includes a scan pattern determination section configured to determine a scan pattern for the sample based on analysis of the low resolution image of the sample. The apparatus further includes a controller configured to control the scan based on the scan pattern, wherein the scan pattern is configured to minimize an amount of back-stitching of scans in the scan pattern.
In certain embodiments, an apparatus includes a strip generator configured to generate strips corresponding to edges of an image to be stitched with another image to form a composite image. The apparatus also includes a memory manager configured to store the strips in a strip repository and to move the image to a full image repository. The apparatus further includes a processor configured to process tiles from a tiles repository, wherein the tiles include at least one tile obtained from the image.
For proper understanding of the invention, reference should be made to the accompanying drawings, wherein:
More generally, the scan order can be affected by two major factors. A first factor is the structure of the sample on the slide. A sample can have any shape. An area without a sample present can be ignored to improve throughput and to reduce the volume of the data.
A second factor is the scanning hardware, namely the XY stage. The term XY stage refers to a stage that can move in an X direction and a Y direction. There is no limitation on the stage moving in other directions, such as in the Z direction. Due to some hardware limitations, for example, hysteresis, meshing losses and the like, it may be desired to move in one direction rather than change direction for each site or field of view (FOV). In other words, it may be desired to minimize the reversals in direction.
Certain embodiments use a priori information about the sites' location in the slide to define the scan order in such a way to minimize the number of sites that cannot be processed immediately after capture.
In certain embodiments, the goal of scanning may be defined by getting the best throughput and using minimum computing resources. Thus, the stitching quality attributes may be related to these definitions. For example, the goal can be to find the scanning route that generates minimal discontinuity in the stitching data, or that generates minimal discontinuity in the stitching data, given a selection of scanning patterns that minimize direction changes.
The system can employ various techniques for determining which scanning procedure is best. For example, the system can determine two optional scanning patterns based on two patterns that minimize the number of changes in direction. In one case, the system can determine the two possible scanning patterns shown in
Accordingly, certain embodiments can use a priori information about the site locations to plan the scan order. Moreover, certain embodiments can use information from the low resolution image or GSI image to identify additional attributes about each site or field of view. Moreover, certain embodiments can rearrange a traditional scan order so as to minimize the number of sites that cannot be processed immediately. Accordingly, certain embodiments can provide a flexible scanning engine to support all types of site order combinations. Moreover, certain embodiments can use information from a low resolution image or GSI image to decide whether a site is stitchable and for which direction(s).
As described above, the amount of memory used for storing the images may be substantial, depending on the size of the images and the number of images to be stitched together. To avoid or minimize such requirements for large memory and high throughput, a system can implement a sequence of operations that process the sites' data as soon as possible, to prevent data accumulation and delay in process.
For example, the memory can be handled by a memory manager that optimizes the memory for minimal usage. Moreover, throughput can be handled by implementing multithreaded architecture taking advantage of the multicore processor's parallel computing power.
Then, at 45, there can be a verification as to whether there is contrast present. If contrast is ok, then at 46 the system can verify focus similarity. If both of these validation tests are passed, then a correlation operator can, at 47, calculate/measure the alignment in the X and Y directions, and return X and Y shifts. If the focus check fails, the system can return that there is a focus issue, which can lead, for example, to a re-imaging of the site or an attempt to proceed as though the tiles are not stitchable. If no or insufficient contrast is present, the system can return a “not stitchable” result.
In
As shown in
As the application stitches an image it can also instruct, at 65, the CUDA GPU to generate the tiles form this image by using the GPU memory manager code interface, at 66.
A get method in the GPU memory manager can transfer, at 67, the tile buffer to the computer memory when the application needs to have access to a tile, such as for processing the tile at 68.
As the application stitches an image, it can also generate tiles from this image, through control, at 75, by using the memory manager code interface at 76. Moreover, a get method in the memory manager at can copy the tile buffer at 77 when the application needs to have access to a tile, such as to process a tile at 78.
In the pyramidal format, each level in the pyramid can be constructed from the predecessor level, while the successor level can use the current level. In other words, each level can be constructed from the level preceding it.
For example, for the intermediate level 83 a tile 84 is composed from the four tiles 82 in its predecessor level. In the intermediate level 87, a tile 86 is composed from the four tiles 85 in the layer below it. The last level can be a single tile 88, which can also serve as a thumbnail.
Accordingly, certain embodiments use a repository/queue and multi-threads for high throughput. Moreover, certain embodiments do not keep entire the whole slide image, for example high resolution image, in memory. Instead, in certain embodiments, it can be removed from memory as soon as shift is calculated. A backward stitching feature can be used to help making a stitching result reliable at an area of less sample availability.
The method can also include, at 1220, determining, by the machine, a scan pattern for the sample based on analysis of the low resolution image of the sample. The determining the scan pattern can be based on the stitching quality attribute for each of the sites. The method can, at 1225, include determining, for each of the plurality of sites, whether a site is stitchable. The method can also, at 1227, include determining, for each of the plurality of sites, a set of at least one direction in which a site is stitchable. For example, a given site that is rectangular may be stitchable in up to four directions, based on the contents of its strips.
The method can further include, at 1230, controlling, by the machine, the scan based on the scan pattern, wherein the scan pattern is configured to minimize an amount of back-stitching of scans in the scan pattern.
Meanwhile, the method can also include, at 1240, scanning the sites and obtaining the images that correspond to the sites. The method can further include, at 1250, generating, by a machine, strips corresponding to edges of an image to be stitched with another image to form a composite image. The method can additionally include, at 1260, storing the strips in a strip repository. The strip repository can be referenced when making determinations about whether stitching is in practice possible for a pair of images.
The method can also include, at 1270, moving, by the machine, the image to a full image repository. The full image repository can store the image in the computer memory or GPU memory or in a large volume disk, such as a hard disk drive. The method can further include, at 1290, processing tiles from a tiles repository, wherein the tiles include at least one tile obtained from the image. The method can additionally include, at 1291, tile compression and saving the tiles to disk. After that, the method can include removing tiles from the tile repository, at 1293.
The method can also include, at 1292, removing, by the machine, the image from the memory before a whole slide of which the image is a part has been processed. The method can include, for example, moving the image from a computer memory to a memory of a graphics processing unit after extracting the strips.
The method can further include, at 1280, stitching the image to another image and, at 1292, removing the image from a buffer after the stitching. In this case, the stitching can be simply a determination and recording of the appropriate shifts for stitching It is not required that the files themselves be combined.
The system 1300 can include a stage control 1340, which can be configured to control the stage used for imaging. The system 1300 can also include a multicore processor and controller 1350, which can be configured to perform multiple processing tasks in parallel. The imaging system 1300 can also include a memory manager 1360. The memory manager 1360 can be configured to control which images, tiles, and strips are stored, and in which memory such images, tiles, and strips are stored, as well as when such images, tiles, and strips are removed from the memory.
The system 1300 can also include a stitching quality determination section 1370. This section can determine the stitching attributes of a tile, and can more particularly determine whether a particular stitching is successful or not. The stitching quality determination section 1370 can interface with the memory manager 1360 to determine whether an image should be retained because it has not yet been fully stitched as illustrated in
The various sections of the imaging system 1300 are shown connected by a physical bus. Other kinds of interconnections are also permitted. It is permitted to divide up the imaging system 1300 into multiple physical sections that are separate from one another, although the various components are shown together. The various sections can be implemented in hardware or in software and hardware combined.
The imaging system 1400 can also include a stage 1450 or other device by which the camera position can be controlled. The imaging system 1400 can additionally include a user interface 1460, which can be used to input values and configure parameters of the system.
The imaging system 1500 can further include a processor 1550 or other controller that can be used to perform processing on images, tiles, strips, and the like. The imaging system 1500 can additionally include a buffer 1560, which can be used for temporary storage of information, with a relative high speed compared to the strip repository 1520 or full image repository 1530.
One having ordinary skill in the art will readily understand that the invention as discussed above may be practiced with steps in a different order, and/or with hardware elements in configurations which are different than those which are disclosed. Therefore, although the invention has been described based upon these preferred embodiments, it would be apparent to those of skill in the art that certain modifications, variations, and alternative constructions would be apparent, while remaining within the spirit and scope of the invention. In order to determine the metes and bounds of the invention, therefore, reference should be made to the appended claims.
AFA Active Focus Area
Active Focus Area can refer to the area within a camera FOV where the autofocus hardware will evaluate the image information for focus measurement.
CCD Charge Coupled Device
CUDA™ can refer to a parallel computing platform and programming model of NVIDIA of Santa Clara, Calif., which harnesses the power of the graphics processing unit (GPU).
FOV Field Of View
GSI Global Slide Image
Global Slide Image can refer to an image that a CCD video camera with appropriate optics is capable of acquiring a full slide in one image.
MB Mega Bytes
Site Position of a particular FOV on the slide sample
Slide can refer to a thin flat piece of glass used to hold objects (samples) for examination under a microscope.
Strip can refer to a slice of the camera image near the image border that is used for stitching to the neighboring image.
This application is related to, claims the priority of, and incorporates by reference herein the entirety of U.S. Provisional Patent No. 61/539,903, filed Sep. 27, 2011.
Number | Date | Country | |
---|---|---|---|
61539903 | Sep 2011 | US |