A reading method supporting multiple pathological image formats

By directly reading the width and height attributes and thumbnail information of pathological images, DZI format files are generated, solving the problems of cumbersome pathological image format conversion and high resource consumption, and realizing efficient and fast pathological image processing and display.

CN117936038BActive Publication Date: 2026-11-06XIAN SHUNDANSHU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410127306.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-30
Publication Date
2026-11-06
Estimated Expiration
2044-01-30

AI Technical Summary

Technical Problem

The existing pathological image format conversion is cumbersome and resource-intensive, resulting in complex conversion processes, high risk of errors, and insufficient memory.

Method used

By directly reading the width and height attributes, the number of original image layers, and thumbnail information of pathological images, multiple image blocks corresponding to the display layers are calculated and generated to produce DZI format files, reducing format conversion steps and optimizing memory usage.

Benefits of technology

It achieves efficient and rapid pathological image processing, reduces program runtime and error risk, and ensures successful conversion and efficient display of ultra-large pathological images.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117936038B_ABST
    Figure CN117936038B_ABST
Patent Text Reader

Abstract

The present application belongs to the fields of digital pathology and medical imageology, and specifically relates to a reading method supporting multiple pathological image formats, which comprises the following steps: calculating the total display layers of pathological images; generating high-level image blocks for display; generating low-level image blocks for display; adding a DZI format file containing pathological image length, width and fixed patch size information; and displaying and browsing high-definition images of each level of the pathological images by reading the generated DZI format file in the front end. By directly reading the width and height attributes, the original image layer number and the thumbnail information of the pathological images, multiple image blocks corresponding to the display layers are calculated and generated. This method can effectively read and directly generate hierarchical image blocks without the need for complicated conversion between different formats, thereby saving program running time and reducing the risk of errors. Meanwhile, the method can more efficiently process super-large size pathological images and greatly reduce the consumption of memory.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to multiple fields such as digital pathology, computer vision, image processing, and medical imaging, specifically a method for reading multiple pathological image formats. Background Technology

[0002] Different manufacturers' pathology slide scanners use different digitization technologies and data encoding methods, resulting in slides in different formats. The choice of these formats typically depends on factors such as scanner performance, image quality requirements, file size, and application software compatibility. Some scanner manufacturers may use their own proprietary formats to store pathology images. These proprietary formats usually have specific functionalities and utility optimizations, but may not be supported by other scanners or software.

[0003] Common pathological image formats include: SVS, NDPI, SCN, MRXS, TIFF, KFB, TIF, SVSLIDE, CWS, CZI, LSM, ZVI, DCM, BIF, TMAP, etc.

[0004] Pathological images are characterized by high resolution, large data volume, diversity, and complexity. To effectively display these images, DeepZoom technology is needed. DeepZoom is a highly efficient image transmission and browsing technology that solves the problem of not being able to directly load the entire image due to its large resolution in high-throughput digital image rendering. Using DeepZoom, large pathological images can be converted to DZI (Deep Zoom Image) format, which breaks them down into multiple layers and image tiles, loading only the necessary portions for display, thus achieving rapid image rendering and browsing. This technology can effectively handle high-resolution pathological images, provide a smooth user experience, and support operations such as zooming in, zooming out, and navigation.

[0005] For reading and converting pathological images of different formats to DZI format, commonly used tools include OpenSlide, Aperio, ImageScope, and pyvips. These tools can convert pathological images of a specific format to DZI format. They typically provide both graphical and command-line interfaces, allowing for batch conversions and parameter settings.

[0006] The two existing problems are:

[0007] 1. A tedious format conversion process

[0008] While existing tools can read and convert pathological images in different formats according to specific needs, several factors need to be considered when choosing a suitable method, including the format and quantity of the pathological images, conversion efficiency, and system platform compatibility. Current pathological image reading tools only support a limited number of formats; for unsupported formats, conversion is required before use. For example, when using KFB format, it is necessary to first use the vendor's tool to convert it to SVS format, and then use pyvips to convert SVS format to DZI format. This conversion process is cumbersome and significantly increases program runtime and the risk of errors. Therefore, further improvements to tools are needed to provide more comprehensive, efficient, and automated pathological image reading and conversion capabilities, reducing the complexity and risk of the conversion process.

[0009] 2. Excessive resource consumption makes it difficult to display large-size, high-resolution pathological images.

[0010] Currently, the most common method for loading images is to load the largest layer of the image into memory. This results in ultra-high resolution pathological images consuming significant resources. If memory is insufficient, the largest layer of the pathological image cannot be loaded, leading to unsuccessful conversion to DZI format. To address this issue, optimization strategies can be employed to reduce resource consumption and ensure successful conversion to DZI format. This improves the processability of pathological images and reduces conversion failures due to resource limitations. Summary of the Invention

[0011] The purpose of this section is to outline some aspects of the embodiments of the present invention and to briefly describe some preferred embodiments. Simplifications or omissions may be made in this section, as well as in the abstract and title of this application, to avoid obscuring the purpose of these documents; however, such simplifications or omissions should not be construed as limiting the scope of the invention.

[0012] In view of the problems existing in the prior art, the present invention is proposed.

[0013] Therefore, the purpose of this invention is to provide a method for reading multiple pathological image formats. This method directly reads the width and height attributes, the number of original image layers, and thumbnail information of the pathological image to calculate and generate multiple image blocks corresponding to the display layer. This method can effectively read and directly generate hierarchical image blocks without the need for cumbersome conversions between different formats, thus saving program runtime and reducing the risk of errors. It also enables more efficient processing of ultra-large pathological images, significantly reducing memory consumption.

[0014] To address the aforementioned technical problems, according to one aspect of the present invention, the present invention provides the following technical solution:

[0015] A method for reading multiple pathological image formats, specifically including the following steps:

[0016] S1: Calculate the total number of display layers in the pathological image; using the pathological image reading tool provided by the manufacturer, read the size information of the maximum resolution of the pathological image, and calculate the total number of display layers required to be generated for that resolution; calculate the total number of display pyramid image blocks required to generate the pathological image. The highest-level size information of the original pathological image was read using the pathological image reading tool provided by the manufacturer, where the width was... Gao Wei Total number of pyramid image block layers displayed The calculation formula is as follows:

[0017]

[0018] S2: Generate high-level image blocks for display;

[0019] S21: Read the number of layers and resolution of each layer of the original pathological image, set a fixed slice size, and calculate the number of rows and columns of each layer;

[0020] S22: Traverse each row and column number, calculate the top-left corner coordinates of all slice images in each layer, read the slice images of each layer according to their top-left corner coordinates, and save them to the folder with the corresponding number; the original layer number of the pathological image itself is read. And the corresponding dimensions of each layer, level_dimensions, assuming the dimension of the x-th layer is... If a fixed slice size is set to 'size', the formula for calculating the number of rows and columns for that layer is as follows:

[0021]

[0022]

[0023] Iterate through each row and column number, and calculate the top-left corner coordinates of all slice images in each layer using the row and column calculation method described above for the xth layer. Read out the slice images of each layer according to their top-left corner coordinates and save them to the folder with the corresponding number.

[0024] S3: Generate low-level image tiles for display:

[0025] S31: Read the thumbnail of the pathological image and find the target display layer position that is closest in size to the thumbnail;

[0026] S32: By zooming in or out of the thumbnail, the dimensions of all lower-level layers can be obtained;

[0027] S33: If the size of the lower-level image is smaller than the fixed block size, the block image is directly saved to the corresponding level folder; otherwise, the row and column numbers are calculated according to the fixed block size, the block image is read and saved to the corresponding folder.

[0028] The image blocks and corresponding row and column numbers of the back layers of the pyramid in the pathological image are generated based on the thumbnail read from the pathological image itself.

[0029] Because pathological image thumbnails are small in size, the images are read directly to obtain the thumbnail image and its size. Based on the size correspondence of each layer of the displayed pyramid, find the layer whose thumbnail size is closest. The location is calculated using the following formula:

[0030]

[0031] By zooming in or out of the thumbnail, you can obtain the dimensions of all lower-level layers, i.e., the [number]th layer. From layer to layer 0; if Compare If the size is large, there's no need to enlarge the dimensions; instead, you only need to shrink the dimensions to generate lower-level pyramid display layers. Assuming you obtain the size of the z-th layer, the size of that layer... The calculation formula is as follows:

[0032]

[0033]

[0034]

[0035] The processing method varies depending on the size of the lower-level image; if the size of the lower-level image is smaller than the fixed slice size, the slice image is directly saved to the corresponding level folder; otherwise, the row and column numbers are obtained according to the fixed slice size, the slice image is read and saved to the corresponding folder.

[0036] S4: Added DZI format files, which contain the length and width of pathological images and fixed section size information;

[0037] S5: The front end reads the generated DZI format file through OpenSeadragon, and displays and browses high-resolution images of various layers of the pathological image.

[0038] As a preferred embodiment of the reading method supporting multiple pathological image formats described in this invention, in step S4, a new DZI format file is added, which is an XML file containing the length, width and fixed block size information of the pathological image; the TileSize in this information is assigned the actual block size, and the Width and Height are assigned the actual width and height of the largest layer of the pathological image.

[0039] As a preferred embodiment of the reading method supporting multiple pathological image formats described in this invention, in step S5, OpenSeadragon supports the use of AJAX, JSONP, and inline configuration to display DZI format images. It automatically loads and displays pathological images of different levels according to the pathological image layer information in the DZI file to achieve a high-resolution interactive display effect. This process can be completed by creating an OpenSeadragon instance in a JavaScript file and specifying the path of the DZI file.

[0040] Compared with the prior art, the beneficial effects of the present invention are:

[0041] 1. This invention directly reads the width and height attributes, original image layer number, and thumbnail information of pathological images to calculate and generate multiple image blocks corresponding to the display layer. This method can effectively read and directly generate hierarchical image blocks without the need for cumbersome conversions between different formats, thus saving program running time and reducing the risk of errors. This method is applicable to pathological images from different manufacturers and in different formats, providing an efficient and fast processing method.

[0042] 2. This invention calculates the number of rows and columns of a high-resolution pathological image, then reads and saves each slice image sequentially according to its row and column numbers, without loading the entire image. Compared to loading the entire image at once, this method effectively solves the problem of excessive resource consumption associated with ultra-high-resolution pathological images. In this way, the program is no longer limited by memory, ensuring successful conversion of high-resolution images to DZI format and significantly improving image processing efficiency. This method can effectively handle ultra-large pathological images, providing efficient conversion and display capabilities.

[0043] 3. This invention utilizes thumbnail information to generate low-level display layers in DZI files, fully leveraging the advantage of small thumbnail file sizes. By quickly generating image blocks and reducing memory usage, it effectively converts low-level images to DZI format. This method not only ensures successful conversion of low-level images to DZI format but also supplements and improves the layer information of the DZI file. Ultimately, the generated DZI file ensures proper display on the front end and provides an efficient and smooth image browsing experience. Attached Figure Description

[0044] To more clearly illustrate the technical solutions of the embodiments of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and detailed embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein:

[0045] Figure 1 This is an overall flowchart of the present invention;

[0046] Figure 2 The diagram shows a detailed process of pyramid generation for this invention. Detailed Implementation

[0047] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0048] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.

[0049] Secondly, the present invention is described in detail with reference to the schematic diagrams. When detailing the embodiments of the present invention, for ease of explanation, the cross-sectional views illustrating the device structure may be partially enlarged, not according to the usual scale. Furthermore, the schematic diagrams are merely examples and should not limit the scope of protection of the present invention. In addition, actual fabrication should include three-dimensional spatial dimensions of length, width, and depth.

[0050] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0051] Please see Figure 1-2 Medical pathology images are image files generated by scanners, containing a series of images ranging from high to low resolution. These images are stacked in a pyramid-like structure, forming a hierarchical structure. However, the hierarchical information stored in a pathology image differs significantly from the hierarchical information required to display that image.

[0052] The process of generating a DZI format file is essentially converting the raw image reading pyramid hierarchy into a pyramid hierarchy structure suitable for display. This conversion process includes the following steps:

[0053] 1. Read the original pyramid structure of the image and obtain the image resolution and position information of each level.

[0054] 2. Select the appropriate layer for display based on display requirements. This may be determined based on scaling or user needs.

[0055] 3. Crop the selected layer, dividing it into several smaller image blocks. These smaller image blocks are the smallest units used for display.

[0056] 4. Generate a DZI format file, saving the cropped image patches and their corresponding layer information in the file. This file contains the image's layer structure and the position information of the image patches.

[0057] This conversion process transforms the pyramid structure of the original pathology image into a display-appropriate pyramid structure and crops it into smaller image blocks to meet the display and loading requirements. This conversion improves the image presentation and user experience, enabling pathology images to be displayed efficiently and smoothly.

[0058] Pathological images often include thumbnail information. A thumbnail is a smaller version of a pathological image, used for quick previewing and navigation. It provides an overview of the overall image, helping doctors or pathologists quickly locate areas of interest. In digital pathology, pathological images are typically stored as high-resolution images, which are very large. To efficiently load and browse these images in software, a thumbnail is embedded in the file. The thumbnail is a compressed version of the original image, smaller in size, and loads faster. With the thumbnail, users can quickly preview pathological images and zoom and navigate as needed. When a user selects a specific area in the software, the software can load detailed information about that area using the original high-resolution image.

[0059] The method provided by this invention has the following steps in actual operation.

[0060] The first step is to calculate the total number of layers in the pyramid image block displayed in the pathological image.

[0061] Calculate the total number of display pyramid image blocks required to generate the pathological image. The highest-level (maximum resolution) size information of the original pathological image was read using the pathological image reading tool provided by the manufacturer, where the width was... Gao Wei Total number of pyramid image tile layers displayed. The calculation formula is as follows:

[0062]

[0063] The second step is to generate the first few layers of the pyramid image blocks.

[0064] The original number of slices read from the pathological image is: And the corresponding dimensions of each layer, level_dimensions, assuming the dimension of the x-th layer is... If a fixed slice size is set to 'size', the formula for calculating the number of rows and columns for that layer is as follows:

[0065]

[0066]

[0067] Iterate through each row and column number, and calculate the top-left corner coordinates of all slice images in each layer using the row and column calculation method described above for the xth layer. Read out the slice images of each layer according to their top-left corner coordinates and save them to the folder with the corresponding number.

[0068] The third step is to generate image blocks and corresponding row and column numbers for the layers behind the pyramid in the pathological image based on the thumbnail read from the pathological image itself.

[0069] Because pathological image thumbnails are small in size, the images can be directly read to obtain the thumbnail image and its size. Based on the size correspondence of each layer of the displayed pyramid, find the layer whose thumbnail size is closest. The location is calculated using the following formula.

[0070]

[0071] By zooming in or out of the thumbnail, you can obtain the dimensions of all lower-level layers, i.e., the [number]th layer. From layer 0 to layer 0. If Compare If the size is large, there's no need to enlarge it; instead, you only need to shrink it to generate lower-level pyramid display layers. Assuming you obtain the size of the z-th layer, the size of that layer... The calculation formula is as follows.

[0072]

[0073]

[0074]

[0075] The processing method varies depending on the size of the lower-level image. If the lower-level image size is smaller than the fixed slice size, the sliced ​​image is directly saved to the corresponding level folder; otherwise, the row and column numbers are obtained based on the fixed slice size, the sliced ​​image is read, and saved to the corresponding folder.

[0076] The fourth step is to add a DZI format file, which is an XML file containing the length, width, and fixed section size information of the pathological image. In this information, TileSize is assigned the actual section size, and Width and Height are assigned the actual width and height of the largest slice in the pathological image. The information content is shown below.

[0077] <?xml version="1.0" encoding="UTF-8"?> <size Height="{h}" Width="{w}" / >

[0078] The fifth step involves the front end using OpenSeadragon to read and interactively display high-resolution pathological images in DZI format.

[0079] OpenSeadragon is a web-based open-source image viewing plugin designed to display high-resolution, scalable images. It supports displaying DZI format images using AJAX (XML / JSON), JSONP, and inline configuration (JSON format). OpenSeadragon offers powerful features and flexible configuration options, automatically loading and displaying different levels of pathological images based on the pathological image hierarchy information in the DZI file to achieve a high-resolution interactive display effect. This process is completed simply by creating an OpenSeadragon instance in a JavaScript file and specifying the path to the DZI file. With OpenSeadragon's functionality, users can easily display and browse high-resolution images on web pages.

[0080] Although the present invention has been described above with reference to embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of the invention. In particular, as long as there is no structural conflict, the features in the disclosed embodiments can be combined with each other in any manner. The lack of an exhaustive description of these combinations in this specification is merely for the sake of brevity and resource conservation. Therefore, the present invention is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.

Claims

1. A method of reading supporting multiple pathological image formats, characterized in that: Specifically, the steps include the following: S1: Calculate the total number of display layers for the pathological image; using the pathological image reading tool provided by the manufacturer, read the size information of the maximum resolution of the pathological image, and calculate the total number of display layers that need to be generated for that resolution; The total number of layers of the display pyramid image blocks to be generated for the pathological image is calculated The highest level size information of the original pathological image is read by a pathological image reading tool provided by a vendor, wherein the width is The height is The total number of layers of the display pyramid image blocks The calculation formula is as follows: ; S2: Generate high-level image blocks for display; S21: Read the number of layers and resolution of each layer of the original pathological image, set a fixed slice size, and calculate the number of rows and columns of each layer; S22: Traverse each row and column number, calculate the top-left corner coordinates of all slice images in each layer, read out the slice images of each layer according to the top-left corner coordinates, and save them to the folder with the corresponding number. Read the original number of layers of pathological image itself is , and the size of each layer level_dimensions, assuming the size of the x layer is ), set the fixed block size to size, then the corresponding row and column number of this layer is calculated as follows: ; ; Iterate through each row and column number, and calculate the top-left corner coordinates of all slice images in each layer using the row and column calculation method described above for the xth layer. Read out the slice images of each layer according to their top-left corner coordinates and save them to the folder with the corresponding number. S3: Generate low-level image tiles for display: S31: Read the thumbnail of the pathological image and find the target display layer position that is closest in size to the thumbnail; S32: By zooming in or out of the thumbnail, the dimensions of all lower-level layers can be obtained; S33: If the size of the lower-level image is smaller than the fixed block size, the block image is directly saved to the corresponding level folder; otherwise, the row and column numbers are calculated according to the fixed block size, the block image is read and saved to the corresponding folder. The image blocks and corresponding row and column numbers of the back layers of the pyramid in the pathological image are generated based on the thumbnail read from the pathological image itself. Because pathological image thumbnails are small in size, the images are read directly to obtain the thumbnail image and its size. Based on the size correspondence of each layer of the displayed pyramid, find the layer whose thumbnail size is closest. The location is calculated using the following formula: ; By zooming in or out of the thumbnail, you can obtain the dimensions of all lower-level layers, i.e., the [number]th layer. From layer to layer 0; if Compare If the size is large, there's no need to enlarge the dimensions; instead, you only need to shrink the dimensions to generate lower-level pyramid display layers. Assuming you obtain the size of the z-th layer, the size of that layer... The calculation formula is as follows: ; ; ; The processing method varies depending on the size of the lower-level image; If the size of the lower-level image is smaller than the fixed slice size, the slice image is directly saved to the corresponding level folder; otherwise, the row and column numbers are obtained according to the fixed slice size, the slice image is read and saved to the corresponding folder. S4: Added DZI format files, which contain information on the length and width of pathological images and the size of fixed sections; S5: The front end reads the generated DZI format file through OpenSeadragon, and displays and browses high-resolution images of each layer of the pathological image.

2. The method for reading multiple pathological image formats according to claim 1, characterized in that: In step S4, a new DZI format file is added, which is an XML file containing the length and width of the pathological image and the fixed block size information; the TileSize in this information is assigned the actual block size, and the Width and Height are assigned the actual width and height of the largest layer of the pathological image.

3. The method for reading multiple pathological image formats according to claim 2, characterized in that: In step S5, OpenSeadragon supports the use of AJAX, JSONP, and inline configuration to display DZI format images. It automatically loads and displays pathological images of different levels according to the pathological image hierarchy information in the DZI file to achieve a high-resolution interactive display effect. This process can be completed by creating an OpenSeadragon instance in a JavaScript file and specifying the path of the DZI file.

Citation Information

Patent Citations

  • Multiple Resolution Image Storage

    US20090317010A1

  • Systems and methods to process electronic images to provide improved visualization and rendering of histopathology slides

    US20220051364A1