WO2022063287A1 - Dicomdir文件的缩略图读取方法及系统 - Google Patents

Dicomdir文件的缩略图读取方法及系统 Download PDF

Info

Publication number
WO2022063287A1
WO2022063287A1 PCT/CN2021/120849 CN2021120849W WO2022063287A1 WO 2022063287 A1 WO2022063287 A1 WO 2022063287A1 CN 2021120849 W CN2021120849 W CN 2021120849W WO 2022063287 A1 WO2022063287 A1 WO 2022063287A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
color
icon
parameter
file
Prior art date
Application number
PCT/CN2021/120849
Other languages
English (en)
French (fr)
Inventor
周兴祥
于全文
Original Assignee
周兴祥
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 周兴祥 filed Critical 周兴祥
Publication of WO2022063287A1 publication Critical patent/WO2022063287A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16HHEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
    • G16H30/00ICT specially adapted for the handling or processing of medical images
    • G16H30/20ICT specially adapted for the handling or processing of medical images for handling medical images, e.g. DICOM, HL7 or PACS
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/54Browsing; Visualisation therefor

Definitions

  • the invention relates to the field of medical image processing, in particular to a method and system for reading thumbnail images of DICOMDIR files.
  • DICOM Digital Imaging and Communications in Medicine
  • DICOM images usually saved to CD or DVD are managed through Digital Imaging and Communications in Medicine Directory (DICOMDIR) in the medical directory, and DICOM images in CD or DVD can be browsed through image browsing software image.
  • DICOMDIR Digital Imaging and Communications in Medicine Directory
  • the DICOM image browsing software When using the DICOM image browsing software to browse the DICOM images in the CD or DVD, firstly display the thumbnails (ICON) of all DICOM images in the image display window of the browsing software for preview, and select one or more DICOM images to enlarge the display. After detailed observation and diagnosis.
  • the DICOM image browsing software realizes the thumbnail preview of the DICOM image, it is usually to quickly query and search the name of each DICOM file from the DICOMDIR file, open and read each DICOM image file to generate the thumbnail image, and then browse the software.
  • the image is represented in the representation window.
  • it takes a long time to generate thumbnails.
  • it takes more than 20 seconds to generate and represent thumbnails of all DICOM images in a CD or DVD, which leads to the efficiency of previewing images of medical staff. low.
  • the DICOMDIR file of the CD or DVD generated by the DICOM image generation device which contains the thumbnail of the DICOM image (Icon Image Sequence: 0088, 0200).
  • the DICOM image browsing software directly reads the icon image sequence (0088, 0200) existing in the DICOMDIR file, instead of reading the DICOM image data and then generating the thumbnails, realizing Quick preview of all DICOM images managed by the DICOMDIR file.
  • the thumbnail image sequence (0088, 0200) in the DICOMDIR file is a dataset composed of icon images.
  • the icon images must not be larger than 128 rows by 128 columns, and only monochrome or paletted color images can be used.
  • the aspect ratio of the icon image in the icon image sequence (0088, 0200) in the DICOMDIR file in some CDs or DVDs is inconsistent with the aspect ratio of the DICOM images managed in DICOMDIR;
  • the color of the icon images in the icon image sequence (0088, 0200) within the DICOMDIR file is monochrome, and the color of the DICOM images managed in DICOMDIR is colorful.
  • the object of the present invention is to provide a method and system for reading a thumbnail image of a DICOMDIR file, so as to solve the inconsistency between the icon image and the actual DICOM image in the thumbnail reading method of the traditional DICOMDIR file, resulting in a slow generation speed of the preview thumbnail, The problem that the quick preview of all DICOM images in DICOMDIR file management cannot be realized.
  • the present invention provides a method for reading a thumbnail image of a DICOMDIR file, comprising:
  • the DICOMDIR file includes a plurality of icon images
  • the first judgment result indicates that an icon image sequence tag exists in the DICOMDIR file
  • the first label value is used to determine the first image parameter of the icon image;
  • the first image parameter includes the width, height and image color category of the icon image;
  • the second tag value is used to determine the second image parameter of the DICOM image in the DICOM image file;
  • the second image parameter includes the DICOM image The width, height and image color category of the DICOM image in the image file;
  • the DICOM image file in the DICOMDIR file is read, and an icon image is generated according to the DICOM image file.
  • adjusting the first image parameter based on the second image parameter, determining the thumbnail of the icon image, and displaying it in the thumbnail image representation window of the browsing software for preview specifically including:
  • the first image parameter is adjusted so that the first image parameter is consistent with the second image parameter.
  • the adjusting the first image parameter so that the first image parameter is consistent with the second image parameter specifically includes:
  • the aspect ratio in the first image parameter is the same as the first image parameter
  • the aspect ratios in the two image parameters are inconsistent, and the aspect ratio of the icon image is adjusted so that the first image parameter is consistent with the second image parameter; the aspect ratio is the ratio of width to height;
  • the second judgment result indicates that the aspect ratio in the first image parameter is consistent with the aspect ratio in the second image parameter, and the image color category in the first image parameter is the same as that in the first image parameter
  • the image color categories in the two image parameters are inconsistent, a color palette is generated, and the image color category of the icon image is adjusted according to the color palette, so that the first image parameters are consistent with the second image parameters;
  • Aspect ratio is the ratio of width to height;
  • the second judgment result indicates that the first image parameters and the second image parameters are inconsistent, while adjusting the aspect ratio of the icon image, a color palette is generated to adjust the color of the icon image category, so that the first image parameter is consistent with the second image parameter; the aspect ratio is the ratio of width to height.
  • the generating a color palette, and adjusting the image color category of the icon image according to the color palette specifically includes:
  • the median segmentation algorithm and the octree color quantization algorithm to convert the 24-bit true color map into a 256-color color map to determine a 256-color palette;
  • the 256-color palette is a color palette;
  • the 24-bit true color map is adjusted according to the color palette to adjust the image color class of the icon image.
  • a thumbnail reading system for DICOMDIR files including:
  • the DICOMDIR file acquisition module is used to acquire the DICOMDIR file;
  • the DICOMDIR file includes a plurality of icon images;
  • the first judgment module is used to judge whether there is an icon image sequence label in the DICOMDIR file, and obtain a first judgment result;
  • a first tag value reading module configured to read the first tag value of each icon image if the first judgment result indicates that an icon image sequence tag exists in the DICOMDIR file, and obtain each the DICOM image file corresponding to the icon image; the first tag value is used to determine the first image parameter of the icon image; the first image parameter includes the width, height and image color category of the icon image;
  • the second tag value reading module is used to read the second tag value in the header information of the DICOM image file; the second tag value is used to determine the second image parameter of the DICOM image in the DICOM image file;
  • the second image parameter includes the width, height and image color category of the DICOM image in the DICOM image file;
  • an adjustment module configured to adjust the first image parameter based on the second image parameter, determine the thumbnail image of the icon image, and display it in the thumbnail image representation window of the browsing software for preview;
  • An icon image generation module configured to read the DICOM image file in the DICOMDIR file if the first judgment result indicates that the icon image sequence tag does not exist in the DICOMDIR file, and generate an icon image according to the DICOM image file .
  • the adjustment module specifically includes:
  • a second judgment sub-module configured to judge whether the first image parameter is consistent with the second image parameter, and obtain a second judgment result
  • the preview module sub-module is used to read the thumbnails of the icon images one by one to the memory, and display them to the browsing software if the second judgment result indicates that the first image parameter is consistent with the second image parameter. Thumbnail image representation window for preview;
  • An adjustment sub-module configured to adjust the first image parameter if the second judgment result indicates that the first image parameter and the second image parameter are inconsistent, so that the first image parameter is consistent with the second image parameter
  • the image parameters are the same.
  • the adjustment submodule specifically includes:
  • Aspect ratio adjustment unit for if the second judgment result indicates that the image color category in the first image parameter is consistent with the image color category in the second image parameter, and the first image parameter
  • the aspect ratio of the icon image is inconsistent with the aspect ratio in the second image parameter, and the aspect ratio of the icon image is adjusted so that the first image parameter is consistent with the second image parameter;
  • the aspect ratio is the width and the ratio of heights;
  • An image color class adjustment unit used for if the second judgment result indicates that the aspect ratio in the first image parameter is consistent with the aspect ratio in the second image parameter, and in the first image parameter
  • the image color category of the icon image is inconsistent with the image color category in the second image parameter, a color palette is generated, and the image color category of the icon image is adjusted according to the color palette, so that the first image parameter and The second image parameters are consistent;
  • the aspect ratio is the ratio of width to height;
  • An aspect ratio and image color category adjustment unit configured to adjust the aspect ratio of the icon image while adjusting the aspect ratio of the icon image if the second judgment result indicates that the first image parameter and the second image parameter are inconsistent
  • a color palette is used to adjust the color category of the icon image, so that the first image parameter is consistent with the second image parameter; the aspect ratio is the ratio of width to height.
  • the image color category adjustment unit specifically includes:
  • the 256-color palette determination subunit is used to convert the 24-bit true color map into a 256-color color map by using the popular color algorithm, the median segmentation algorithm and the octree color quantization algorithm to determine the 256-color palette; the 256
  • the color palette is a color palette;
  • a 24-bit true color image acquisition subunit for acquiring a 24-bit true color image of the icon image
  • the image color category adjustment subunit is used to adjust the 24-bit true color image according to the color palette, so as to adjust the image color category of the icon image.
  • the present invention discloses the following technical effects: the present invention provides a method and system for reading a thumbnail image of a DICOMDIR file. When browsing a DICOMDIR file in a CD or DVD, the DICOMDIR file is directly read.
  • the icon image sequence existing in the icon image sequence by comparing the first image parameter of the icon image in the icon image sequence and the second image parameter of the DICOM image in the DICOM image file, based on the comparison result, adjust the first image parameter, so that the icon image and the DICOM image
  • the thumbnail of the icon image is determined, and displayed in the thumbnail image display window of the browsing software for preview, which improves the generation efficiency of preview thumbnails and realizes all DICOM images managed by DICOMDIR files. Quick preview improves the efficiency of medical staff.
  • FIG. 1 is a flowchart of a method for reading thumbnail images of DICOMDIR files provided by the present invention
  • Fig. 2 is the composition diagram of the (0088,0200) icon sequence provided by the present invention.
  • Fig. 3 is the 256-color palette schematic diagram that the octree color quantization algorithm provided by the present invention generates
  • FIG. 4 is a structural diagram of a thumbnail reading system of a DICOMDIR file provided by the present invention.
  • the purpose of the present invention is to provide a flow chart of a method for reading thumbnail images of DICOMDIR files.
  • the icon image sequence (0088, 0200) in the DICOMDIR file the consistent quick preview of the icon image and the actual DICOM image is realized.
  • FIG. 1 is a flowchart of a method for reading thumbnail images of DICOMDIR files provided by the present invention. As shown in FIG. 1, a method for reading thumbnail images of DICOMDIR files includes:
  • Step 101 Obtain a DICOMDIR file; the DICOMDIR file includes a plurality of icon images.
  • Step 102 Determine whether there is an icon image sequence label in the DICOMDIR file, if yes, go to Step 103, if not, go to Step 106.
  • Step 103 Read the first tag value of each of the icon images, and obtain the DICOM image file corresponding to each of the icon images; the first tag value is used to determine the first image of the icon image parameters; the first image parameters include the width, height and image color category of the icon image.
  • the interpretability information determines whether the icon image is a grayscale image or a 256-color color image.
  • the photometric interpretation information of the icon image is 'MONOCHROME1' or 'MONOCHROME2', it means that the icon image is a grayscale image; if the photometric interpretation information of the icon image is PALETTECOLOR, it means that the icon image is a 256-color color image.
  • Step 104 Read the second tag value in the header information of the DICOM image file; the second tag value is used to determine the second image parameter of the DICOM image in the DICOM image file; the second image parameter includes The width, height and image color category of the DICOM image in the DICOM image file.
  • the photometric interpretation information of the DICOM image is MONOCHROME1 or MONOCHROME2, it means that the DICOM image is a monochrome grayscale image; if the photometric interpretation information of the DICOM image is RGB, YBR_FULL, YBR_FULL_422, it means that the DICOM image is a color image. If the photometric interpretation information of the DICOM image is PALETTECOLOR, it means that the DICOM image is a palette color image.
  • Step 105 Based on the second image parameter, adjust the first image parameter, determine the thumbnail image of the icon image, and display it in the thumbnail image display window of the browsing software for preview.
  • the aspect ratio of the first icon image and the image of the first DICOM image file corresponding to the icon image are the same and the color information is also the same, then read the icon images in the icon image sequence (0088, 0200) tag one by one into the memory And it is displayed to the thumbnail image display window of the browsing software for quick preview.
  • the aspect ratio of the first icon image and the DICOM image file corresponding to the icon are inconsistent but the colors are the same, then read the icon images in the icon image sequence (0088, 0200) tags one by one into the memory, and use (2) to obtain The aspect ratio value of the DICOM image is the reference aspect ratio, and the icon image in the memory is regenerated according to the reference aspect ratio value and displayed in the thumbnail image display window of the browsing software.
  • the icon image is a monochrome grayscale image
  • the DICOM image file is a color image
  • the 24-bit true color image data of the DICOM image file is stored in the memory. If the first DICOM image file corresponding to the icon image is a 24-bit true color image of a DICOM animation, the 24-bit true color image data of the first frame of the animation image is stored in the memory. , and then use the 24-bit true color image data to generate 256-color palette data, use this palette to change the monochrome icon image into a 256-color image and display it in the thumbnail image display window of the browsing software.
  • the 24-bit true color image is converted into a 256-color color image.
  • Common algorithms include popular color algorithm, median segmentation algorithm, octree color quantization algorithm, etc. Among them, as shown in Figure 3, the octree color quantization algorithm algorithm The basic idea is to distribute the RGB color values used in the image into a layered octree.
  • the depth of the octree can be up to 9 layers, that is, the root node layer plus 8 layers of nodes representing each bit of the 8-bit R, G, and B values.
  • the lower node layers correspond to the less significant bits of the RGB value (bits on the right).
  • the leaf node code stores the number of pixels and the values of the R, G, and B color components; and the intermediate nodes form the path from the topmost layer to the leaf node. This is an efficient storage method, which can not only store the colors that appear in the image and the number of times they appear, but also will not waste memory to store the colors that do not appear in the image.
  • the octree color quantization algorithm is efficient and effective.
  • the octree color quantization algorithm is used to realize the conversion of 24-bit true color image into 256-color color image, and then a 256-color palette is obtained. Use this palette to change a monochrome icon image to a 256-color image and display it in the thumbnail image display window of the browsing software.
  • the DICOM image is a JPEG compressed color image.
  • the octree color quantization algorithm is also used to convert the 24-bit true color image into a 256-color color image. After getting a palette of 256 colors. Use this palette to change a monochrome icon image to a 256-color image and display it in the thumbnail image display window of the browsing software.
  • the DICOM image is a color image with a palette if the photometric interpretation of the DICOM image is PALETTE COLOR.
  • a 256-color palette is generated. Use this palette to change a single-color icon image to a 256-color icon image and display it in the thumbnail image display window of the browsing software.
  • the aspect ratio of the icon image and the DICOM image file corresponding to the icon are inconsistent, and the color information is also inconsistent, that is, the icon image is a monochrome grayscale image, and the image in the DICOM image file is a color image
  • read the icon image sequence (0088 , 0200) after the icon image in the label is stored in the memory firstly use the 256-color palette to change the icon image to a color image, and then use the aspect ratio of the DICOM image to change the aspect ratio of the icon image to show the thumbnail of the browsing software
  • the image represents the window.
  • Step 106 If the first judgment result indicates that the icon image sequence tag does not exist in the DICOMDIR file, read the DICOM image file in the DICOMDIR file, and generate an icon image according to the DICOM image file.
  • the DICOMDIR file After searching all the DICOM image files from the DICOMDIR file, open the DICOM image files one by one, read the (0028, 0004) tag value in the DICOM file header, and get the DICOM
  • the photometric interpretation information of the image read the (0028, 0011) tag value in the DICOM file header to get the width of the image, and then read the (0028, 0010) tag value in the DICOM file header to get the image's Height, the aspect ratio of the DICOM image is calculated according to the width and height of the image.
  • the photometric interpretation information is MONOCHROME1 or MONOCHROME2
  • the image is a monochrome grayscale image
  • read the first frame image in each DICOM image file to the memory and generate a monochrome icon image according to a certain size
  • the latter display is displayed in the thumbnail image preview display window of the browsing software.
  • the photometric interpretation information of the DICOM image is RGB, it means that the image is a 24-bit true color image, read the first frame color image in each DICOM image file to the memory, and use the method in (5) to generate 256 colors color palette,
  • the DICOM image is a JPEG compressed color image.
  • a 256-color palette is used, and the palette is used to generate a 256-color icon image according to a certain size. The latter display is displayed in the thumbnail image preview display window of the browsing software.
  • the DICOM image is a color image with a palette if the photometric interpretation of the DICOM image is PALETTECOLOR.
  • DICOMDIR is a variable-length mini-database file. Subject to group(0002, xxxx) and group(0004, xxxx), it describes a 4-level tree structure. It consists of patient (Patient), study (Study), sequence (Series) and image (Image). DICOM images saved in DICOM CD or DVD are managed by DICOMDIR files, and the DICOM image browsing software can quickly browse the DICOM images managed by DICOMDIR.
  • DICOMDIR file Open a 640-megabyte CD, there is a DICOMDIR file in the root directory of the CD, and the DICOMDIR file manages 16 DICOM image files.
  • the icon image obtained in (1) is a monochrome grayscale image, and the actual DICOM image is a 24-bit true color image. In order to maintain consistency with the actual DICOM image when the icon image is quickly previewed, it is necessary to calculate 256 of the actual DICOM image. Color palette, use this palette to change the icon image to a 256-color color icon image.
  • the octree color quantization algorithm has the characteristics of high efficiency and good effect.
  • the octree color quantization algorithm is used to realize the conversion of 24-bit true color to 256 colors.
  • an octree is established.
  • the characteristic of an octree node is that each node has a maximum of 8 byte points, numbered 0 to 7.
  • Read the 24-bit true color image data in the DICOM image file obtained in (1) to the memory build an octree with the RGB values of each pixel of the image, first establish the root node (Root), and then use the RGB values of the image pixels respectively
  • Each bit constitutes a value from 0 to 7 and is inserted into the tree in turn.
  • the values of the first layer to the eighth layer are 0, 5, 6, 6, 5, 3, 7, and 4, respectively.
  • the RGB values of all pixels are inserted into the octree layer by layer, and on each node, the sum of the RGB values of all the nodes passed through, and the number of RGB colors are recorded.
  • the node does not exist, you need to create a new node, and then increase the node count and the sum of the RGB components.
  • inserting it is found that the node already exists and is a leaf node, then stop the subsequent layers of the color. Insertion of nodes. After inserting a color, if the number of leaf nodes exceeds the number of colors to be obtained (256 colors require 256 colors), the nodes need to be merged so that the number of leaf nodes does not exceed the number of colors to be obtained.
  • an octree with no more than 256 leaf nodes is established.
  • the average value of the RGB components in the leaf nodes is taken out, which is the obtained palette color value, and the palette extraction is completed.
  • Fig. 4 is the structure diagram of the thumbnail reading system of DICOMDIR file provided by the present invention, as shown in Fig. 4, a kind of thumbnail reading system of DICOMDIR file is characterized in that, comprises:
  • the DICOMDIR file acquiring module 401 is configured to acquire a DICOMDIR file; the DICOMDIR file includes a plurality of icon images.
  • the first judgment module 402 is configured to judge whether there is an icon image sequence tag in the DICOMDIR file, and obtain a first judgment result.
  • the first tag value reading module 403 is configured to read the first tag value of each icon image if the first judgment result indicates that an icon image sequence tag exists in the DICOMDIR file, and obtain each A DICOM image file corresponding to the icon image; the first tag value is used to determine the first image parameter of the icon image; the first image parameter includes the width, height and image color category of the icon image.
  • the second tag value reading module 404 is configured to read the second tag value in the header information of the DICOM image file; the second tag value is used to determine the second image parameter of the DICOM image in the DICOM image file ;
  • the second image parameter includes the width, height and image color category of the DICOM image in the DICOM image file.
  • the adjustment module 405 is configured to adjust the first image parameter based on the second image parameter, determine the thumbnail image of the icon image, and display the thumbnail image in the thumbnail image display window of the browsing software for preview.
  • the adjustment module 405 specifically includes: a second judgment sub-module for judging whether the first image parameter is consistent with the second image parameter to obtain a second judgment result; a preview module sub-module for if the first image parameter is consistent with the second image parameter;
  • the second judgment result indicates that the first image parameter is consistent with the second image parameter, read the thumbnails of the icon images one by one to the memory, and indicate that they are previewed in the thumbnail image display window of the browsing software; a module, configured to adjust the first image parameter so that the first image parameter and the second image parameter are inconsistent if the second judgment result indicates that the first image parameter is inconsistent with the second image parameter Consistent.
  • the adjustment sub-module specifically includes: an aspect ratio adjustment unit, configured to, if the second judgment result indicates that the image color category in the first image parameter is consistent with the image color category in the second image parameter, and the aspect ratio in the first image parameter is inconsistent with the aspect ratio in the second image parameter, adjust the aspect ratio of the icon image so that the first image parameter and the second image parameter Consistent; aspect ratio is the ratio of width to height.
  • An image color class adjustment unit used for if the second judgment result indicates that the aspect ratio in the first image parameter is consistent with the aspect ratio in the second image parameter, and in the first image parameter
  • the image color category of the icon image is inconsistent with the image color category in the second image parameter, a color palette is generated, and the image color category of the icon image is adjusted according to the color palette, so that the first image parameter and The second image parameters are consistent;
  • the aspect ratio is the ratio of the width to the height.
  • the image color category adjustment unit specifically includes: a 256-color palette determination subunit, used for converting a 24-bit true color map into a 256-color color map by using a popular color algorithm, a median segmentation algorithm, and an octree color quantization algorithm. , determine a 256-color palette; the 256-color palette is a color palette; a 24-bit true color image acquisition subunit is used to acquire a 24-bit true color image of the icon image; an image color category adjustment subunit, used The 24-bit true color image is adjusted according to the color palette to adjust the image color class of the icon image.
  • An aspect ratio and image color category adjustment unit configured to adjust the aspect ratio of the icon image while adjusting the aspect ratio of the icon image if the second judgment result indicates that the first image parameter and the second image parameter are inconsistent
  • a color palette is used to adjust the color category of the icon image, so that the first image parameter is consistent with the second image parameter; the aspect ratio is the ratio of width to height.
  • the icon image generation module 406 is configured to read the DICOM image file in the DICOMDIR file if the first judgment result indicates that the icon image sequence tag does not exist in the DICOMDIR file, and generate an icon according to the DICOM image file image.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Public Health (AREA)
  • Epidemiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Primary Health Care (AREA)
  • Radiology & Medical Imaging (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
  • Processing Or Creating Images (AREA)

Abstract

本发明涉及一种DICOMDIR文件的缩略图读取方法及系统。该方法包括:获取DICOMDIR文件;判断所述DICOMDIR文件中是否存在图标图像序列标签,若是,读取每一张所述图标图像的第一标签值,并获取每一张所述图标图像对应的DICOM图像文件;读取所述DICOM图像文件的头信息中的第二标签值;基于所述第二图像参数,调整所述第一图像参数,确定所述图标图像的缩略图,并表示至浏览软件的缩略图图像表示窗口中进行预览;若否,读取所述DICOMDIR文件中DICOM图像文件,并根据所述DICOM图像文件,生成图标图像。本发明能够提高预览缩略图的生成效率以及医务工作人员的工作效率。

Description

[根据细则37.2由ISA制定的发明名称] DICOMDIR文件的缩略图读取方法及系统
本申请要求于2020年9月27日提交中国专利局、申请号为202011029089.6、发明名称为“一种DICOMDIR文件的缩略图读取方法及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及医学影像处理领域,特别是涉及一种DICOMDIR文件的缩略图读取方法及系统。
背景技术
目前在医院中,CT,核磁共振,血管造影诊断装置,超音波诊断装置等产生的医学数字成像和通信影像(Digital Imaging and Communications in Medicine,DICOM),可以在便携式的CD或是DVD媒体上保存为DICOM图像,交给患者保管或是转院时交给其他第三方医疗机构,实现了DICOM图像的无胶片化管理。
通常保存到CD或是DVD上的DICOM图像,通过医学目录中的数字成像与通信文件(Digital Imaging and Communications in Medicine Directory,DICOMDIR)进行管理,并可以通过影像浏览软件浏览CD或是DVD中的DICOM图像。
使用DICOM图像浏览软件浏览CD或是DVD中的DICOM图像时,首先在浏览软件的图像表示窗口中表示出全部的DICOM图像的缩略图(ICON)进行预览,选择一个或是多个DICOM图像放大表示后做详细观察及诊断。
DICOM图像浏览软件实现DICOM图像的缩略图进行预览时,通常是从DICOMDIR文件中快速查询和搜索到各个DICOM文件的名称后,打开并读取各个DICOM图像文件生成缩略图图像后在在浏览软件的图像表示窗口中表示。当CD或是DVD中图像个数很多时,生成缩略图需要的时间很长,有时生成及表示一个CD或是DVD中的全部DICOM图像的缩略图需要20秒以上,导致医务人员图像的预览效率低下。
目前有很多厂家的图像诊断设备或是DICOM图像生成装置中生成的CD或是DVD的DICOMDIR文件中,包含有DICOM图像的缩略图 (Icon Image Sequence:0088,0200)。为了快速的读取并表示缩略图进行DICOM图像的预览,DICOM图像浏览软件中直接读取DICOMDIR文件中存在的图标图像序列(0088,0200),而不是读取DICOM图像数据再生成缩略图,实现DICOMDIR文件管理的全部的DICOM图像的快速预览。
DICOMDIR文件中的缩略图图像序列(0088,0200),是由图标图像组成的数据集,图标图像不得大于128行乘以128列,仅可使用单色或是调色板彩色图像。但是有的CD或是DVD中的DICOMDIR文件内的图标图像序列(0088,0200)中的图标图像的宽高比和DICOMDIR中管理的DICOM图像的宽高比不一致;还有的CD或是DVD中的DICOMDIR文件内的图标图像序列(0088,0200)中的图标图像的颜色是单色的,DICOMDIR中管理的DICOM图像的颜色是彩色的。这种情况下读取图标图像序列(0088,0200)进行快速预览时,会引起预览的缩略图图标和实际的DICOM图像宽高比或是色彩不一致的问题。因此,在读取DICOMDIR文件中的图标图像序列(0088,0200)进行快速预览时,必须解决图标图像和实际DICOM图像的一致性问题。
发明内容
基于此,本发明的目的是提供一种DICOMDIR文件的缩略图读取方法及系统,以解决传统DICOMDIR文件的缩略图读取方法中图标图像与实际DICOM图像不一致,导致预览缩略图生成速度慢,无法实现DICOMDIR文件管理的全部的DICOM图像快速预览的问题。
为实现上述目的,本发明提供了一种DICOMDIR文件的缩略图读取方法,包括:
获取DICOMDIR文件;所述DICOMDIR文件包括多张图标图像;
判断所述DICOMDIR文件中是否存在图标图像序列标签,得到第一判断结果;
若所述第一判断结果表示为所述DICOMDIR文件中存在图标图像序 列标签,读取每一张所述图标图像的第一标签值,并获取每一张所述图标图像对应的DICOM图像文件;所述第一标签值用于确定所述图标图像的第一图像参数;所述第一图像参数包括所述图标图像的宽度、高度以及图像色彩类别;
读取所述DICOM图像文件的头信息中的第二标签值;所述第二标签值用于确定所述DICOM图像文件中DICOM图像的第二图像参数;所述第二图像参数包括所述DICOM图像文件中DICOM图像的宽度、高度以及图像色彩类别;
基于所述第二图像参数,调整所述第一图像参数,确定所述图标图像的缩略图,并表示至浏览软件的缩略图图像表示窗口中进行预览;
若所述第一判断结果表示为所述DICOMDIR文件中不存在图标图像序列标签,读取所述DICOMDIR文件中DICOM图像文件,并根据所述DICOM图像文件,生成图标图像。
可选的,所述基于所述第二图像参数,调整所述第一图像参数,确定所述图标图像的缩略图,并表示至浏览软件的缩略图图像表示窗口中进行预览,具体包括:
判断所述第一图像参数与所述第二图像参数是否一致,得到第二判断结果;
若所述第二判断结果表示为所述第一图像参数与所述第二图像参数一致,逐个读取所述图标图像的缩略图至内存,并表示至浏览软件的缩略图图像表示窗口中进行预览;
若所述第二判断结果表示为所述第一图像参数与所述第二图像参数不一致,调整所述第一图像参数,使得所述第一图像参数与所述第二图像参数一致。
可选的,所述调整所述第一图像参数,使得所述第一图像参数与所述第二图像参数一致,具体包括:
若所述第二判断结果表示为所述第一图像参数中的图像色彩类别与所述第二图像参数中的图像色彩类别一致,且所述第一图像参数中的宽高比与所述第二图像参数中的宽高比不一致,调整所述图标图像的宽高比, 使得所述第一图像参数与所述第二图像参数一致;宽高比为宽度与高度的比值;
若所述第二判断结果表示为所述第一图像参数中的宽高比与所述第二图像参数中的宽高比一致,且所述第一图像参数中的图像色彩类别与所述第二图像参数中的图像色彩类别不一致,生成彩色调色板,并根据所述彩色调色板调整所述图标图像的图像色彩类别,使得所述第一图像参数与所述第二图像参数一致;宽高比为宽度与高度的比值;
若所述第二判断结果表示为所述第一图像参数与所述第二图像参数均不一致,调整所述图标图像的宽高比的同时,生成彩色调色板以调整所述图标图像的色彩类别,使得所述第一图像参数与所述第二图像参数一致;宽高比为宽度与高度的比值。
可选的,所述生成彩色调色板,并根据所述彩色调色板调整所述图标图像的图像色彩类别,具体包括:
利用流行色算法、中位切分算法以及八叉树颜色量化算法将24位真色彩图转换为256色的彩色图,确定256色调色板;所述256色调色板为彩色调色板;
获取所述图标图像的24位真彩色图;
根据所述彩色调色板调整所述24位真彩色图,以调整所述图标图像的图像色彩类别。
一种DICOMDIR文件的缩略图读取系统,包括:
DICOMDIR文件获取模块,用于获取DICOMDIR文件;所述DICOMDIR文件包括多张图标图像;
第一判断模块,用于判断所述DICOMDIR文件中是否存在图标图像序列标签,得到第一判断结果;
第一标签值读取模块,用于若所述第一判断结果表示为所述DICOMDIR文件中存在图标图像序列标签,读取每一张所述图标图像的第一标签值,并获取每一张所述图标图像对应的DICOM图像文件;所述第一标签值用于确定所述图标图像的第一图像参数;所述第一图像参数包 括所述图标图像的宽度、高度以及图像色彩类别;
第二标签值读取模块,用于读取所述DICOM图像文件的头信息中的第二标签值;所述第二标签值用于确定所述DICOM图像文件中DICOM图像的第二图像参数;所述第二图像参数包括所述DICOM图像文件中DICOM图像的宽度、高度以及图像色彩类别;
调整模块,用于基于所述第二图像参数,调整所述第一图像参数,确定所述图标图像的缩略图,并表示至浏览软件的缩略图图像表示窗口中进行预览;
图标图像生成模块,用于若所述第一判断结果表示为所述DICOMDIR文件中不存在图标图像序列标签,读取所述DICOMDIR文件中DICOM图像文件,并根据所述DICOM图像文件,生成图标图像。
可选的,所述调整模块具体包括:
第二判断子模块,用于判断所述第一图像参数与所述第二图像参数是否一致,得到第二判断结果;
预览模块子模块,用于若所述第二判断结果表示为所述第一图像参数与所述第二图像参数一致,逐个读取所述图标图像的缩略图至内存,并表示至浏览软件的缩略图图像表示窗口中进行预览;
调整子模块,用于若所述第二判断结果表示为所述第一图像参数与所述第二图像参数不一致,调整所述第一图像参数,使得所述第一图像参数与所述第二图像参数一致。
可选的,所述调整子模块具体包括:
宽高比调整单元,用于若所述第二判断结果表示为所述第一图像参数中的图像色彩类别与所述第二图像参数中的图像色彩类别一致,且所述第一图像参数中的宽高比与所述第二图像参数中的宽高比不一致,调整所述图标图像的宽高比,使得所述第一图像参数与所述第二图像参数一致;宽高比为宽度与高度的比值;
图像色彩类别调整单元,用于若所述第二判断结果表示为所述第一图像参数中的宽高比与所述第二图像参数中的宽高比一致,且所述第一图像 参数中的图像色彩类别与所述第二图像参数中的图像色彩类别不一致,生成彩色调色板,并根据所述彩色调色板调整所述图标图像的图像色彩类别,使得所述第一图像参数与所述第二图像参数一致;宽高比为宽度与高度的比值;
宽高比以及图像色彩类别调整单元,用于若所述第二判断结果表示为所述第一图像参数与所述第二图像参数均不一致,调整所述图标图像的宽高比的同时,生成彩色调色板以调整所述图标图像的色彩类别,使得所述第一图像参数与所述第二图像参数一致;宽高比为宽度与高度的比值。
可选的,所述图像色彩类别调整单元具体包括:
256色调色板确定子单元,用于利用流行色算法、中位切分算法以及八叉树颜色量化算法将24位真色彩图转换为256色的彩色图,确定256色调色板;所述256色调色板为彩色调色板;
24位真彩色图获取子单元,用于获取所述图标图像的24位真彩色图;
图像色彩类别调整子单元,用于根据所述彩色调色板调整所述24位真彩色图,以调整所述图标图像的图像色彩类别。
根据本发明提供的具体实施例,本发明公开了以下技术效果:本发明提供了一种DICOMDIR文件的缩略图读取方法及系统,浏览CD或是DVD中的DICOMDIR文件时,直接读取DICOMDIR文件中存在的图标图像序列,通过对比图标图像序列中的图标图像的第一图像参数以及DICOM图像文件中DICOM图像的第二图像参数,基于对比结果,调整第一图像参数,使得图标图像与DICOM图像的参数一致后,再确定所述图标图像的缩略图,并表示至浏览软件的缩略图图像表示窗口中进行预览,提高了预览缩略图的生成效率,实现了DICOMDIR文件管理的全部的DICOM图像的快速预览,提高了医务工作人员的工作效率。
说明书附图
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附 图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本发明所提供的DICOMDIR文件的缩略图读取方法流程图;
图2为本发明所提供的(0088,0200)图标序列构成图;
图3为本发明所提供的八叉树颜色量化算法生成256色调色板示意图;
图4为本发明所提供的DICOMDIR文件的缩略图读取系统结构图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明的目的是提供一种DICOMDIR文件的缩略图读取方法流程图,在读取DICOMDIR文件中图标图像序列(0088,0200)时,实现图标图像和实际DICOM图像的一致性快速预览。
为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。
图1为本发明所提供的DICOMDIR文件的缩略图读取方法流程图,如图1所示,一种DICOMDIR文件的缩略图读取方法,包括:
步骤101:获取DICOMDIR文件;所述DICOMDIR文件包括多张图标图像。
打开一个CD或是DVD中的DICOMDIR文件,检测DICOMDIR文件中图标图像序列(Icon Image Sequence)(0088,0200)标签是否存在。(0088,0200)图标图像序列结构如附图2所示。
步骤102:判断所述DICOMDIR文件中是否存在图标图像序列标签,若是,执行步骤103,若否,执行步骤106。
步骤103:读取每一张所述图标图像的第一标签值,并获取每一张所述图标图像对应的DICOM图像文件;所述第一标签值用于确定所述图标 图像的第一图像参数;所述第一图像参数包括所述图标图像的宽度、高度以及图像色彩类别。
如果存在(0088,0200)标签,则从图标图像序列(0088,0200)标签中读取(0028,0004)(Photometric Interpretation)标签的第一标签值,得到图标图像的光度解释度信息,根据光度解释度信息判定图标图是灰度图还是256色的彩色图。图标图像序列(0088,0200)标签中的图标图像的色彩类别有两类,分别是单色灰度图或是256色彩色图。如果图标图像的光度解释度信息是'MONOCHROME1'或是'MONOCHROME2',表示图标图是灰度图;如果图标图像的光度解释度信息是PALETTECOLOR,表示图标图是256色的彩色图。
读取(0028,0011)(Columns)标签中的第一标签值,得到图标图像的的宽度,然后读取(0028,0010)(Rows)标签中的值,得到图标图像的高度,使用图标图像的宽度和高度比值得到图标图像的宽高比。
步骤104:读取所述DICOM图像文件的头信息中的第二标签值;所述第二标签值用于确定所述DICOM图像文件中DICOM图像的第二图像参数;所述第二图像参数包括所述DICOM图像文件中DICOM图像的宽度、高度以及图像色彩类别。
从DICOMDIR文件中搜寻到图标图像对应的DICOM图像文件,打开并读取该DICOM图像文件头信息中的(0028,0004)标签的第二标签值,得到该DICOM图像的光度解释度信息,根据光度解释度信息判定DICOM图像是灰度图还是彩色图像。
如果该DICOM图像的光度解释度信息是MONOCHROME1或是MONOCHROME2,表示该DICOM图像是单色灰度图像,如果该DICOM图像的光度解释度信息是RGB、YBR_FULL、YBR_FULL_422,表示该DICOM图像是彩色图像。如果该DICOM图像的光度解释度信息是PALETTECOLOR,表示该DICOM图像是调色板彩色图像。
读取DICOM图像文件头信息中的(0028,0011)标签中的第二标签值,得到DICOM图像的的宽度,读取DICOM图像文件头信息中的(0028,0010)标签中的值,得到DICOM图像的高度,使用该DICOM图像的宽 度和高度比值得到该DICOM图像的宽高比。
步骤105:基于所述第二图像参数,调整所述第一图像参数,确定所述图标图像的缩略图,并表示至浏览软件的缩略图图像表示窗口中进行预览。
若第一个图标图像和该图标图像对应的第一个DICOM图像文件的图像的宽高比一致并且颜色信息也一致,则逐个读取图标图像序列(0088,0200)标签中的图标图像到内存并表示到浏览软件的缩略图图像表示窗口中进行快速预览。
若第一个图标图和该图标对应的DICOM图像文件的宽高比不一致但是颜色一致,则逐个读取图标图像序列(0088,0200)标签中的图标图像到内存后,使用(2)中得到的DICOM图像的宽高比数值为基准宽高比,对内存中的图标图像按照这个基准的宽高比值重新生成图标图像并表示到浏览软件的缩略图图像表示窗口中。
若图标图像和该图标对应的DICOM图像文件的宽高比一致,但是颜色信息不一致,图标图像是单色灰度图,DICOM图像文件是彩色图像时,则逐个读取图标图像对应的第一个DICOM图像文件的24位真彩色图像数据到内存,如果图标图像对应的第一个DICOM图像文件是DICOM动画24位真彩色图像,则对该动画图像的第一帧24位真彩色图像数据到内存,然后使用该24位真彩色图像数据生成256色的调色板数据,使用这个调色板改变单色的图标图像为256色的图像并表示到浏览软件的缩略图图像表示窗口中。
24位真彩色图转换为256色的彩色图,常用的算法有流行色算法、中位切分算法、八叉树颜色量化算法等,其中,如图3所示,八叉树颜色量化算法算法基本思路是:将图像中使用的RGB颜色值分布到层状的八叉树中。八叉树的深度可达9层,即根节点层加上分别表示8位的R、G、B值的每一位的8层节点。较低的节点层对应于较不重要的RGB值的位(右边的位)。叶节点编码存储像素的个数和R、G、B颜色分量的值;而中间的节点组成了从最顶层到叶节点的路径。这是一种高效的存储方式,既可以存储图像中出现的颜色和其出现的次数,也不会浪费内存来存 储图像中不出现的颜色,八叉树颜色量化算法效率高,效果好。
为了快速的表示DICOMDIR文件中的图标图像,实现快速阅览,采用八叉树颜色量化算法实现24位真彩色图转换为256色的彩色图后得到256色的调色板。使用这个调色板改变单色的图标图像为256色的图像并表示到浏览软件的缩略图图像表示窗口中。
如果该DICOM图像的光度解释度信息是YBR_FULL、YBR_FULL_422,DICOM图像是JPEG压缩的彩色图像。读取图标图像对应的DICOM图像文件的第一帧的彩色图像数据到内存后转换为24位真彩色图像后,也采用八叉树颜色量化算法实现24位真彩色图转换为256色的彩色图后得到256色的调色板。使用这个调色板改变单色的图标图像为256色的图像并表示到浏览软件的缩略图图像表示窗口中。
如果该DICOM图像的光度解释度信息PALETTE COLOR,DICOM图像是带有调色板的彩色图像。读取图标图像对应的DICOM图像文件的头中的(0028,1201)标签:红色调色板颜色查找表数据RedPalette Color Lookup Table Data、(0028,1202)标签:绿色调色板颜色查找表数据Green Palette ColorLookup Table Data、(0028,1203)标签:蓝色调色板颜色查找表数据Blue Palette ColorLookup Table Data,得到调色板红、绿、蓝三色的数据后,生成256色的调色板。使用这个调色板改变单色的图标图像为256色的图标图像并表示到浏览软件的缩略图图像表示窗口中。
若图标图像和该图标对应的DICOM图像文件的宽高比不一致,颜色信息也不一致,即图标图像是单色灰度图像,DICOM图像文件中的图像是彩色图像式,读取图标图像序列(0088,0200)标签中的图标图像到内存后,首先利用256色调色板改变图标图像为彩色图的同时,再利用DICOM图像的宽高比改变图标图像的宽高比后表示到浏览软件的缩略图图像表示窗口中。
步骤106:若所述第一判断结果表示为所述DICOMDIR文件中不存在图标图像序列标签,读取所述DICOMDIR文件中DICOM图像文件,并根据所述DICOM图像文件,生成图标图像。
若DICOMDIR文件中不存在(0088,0200)标签,则从DICOMDIR 文件中搜寻到全部的DICOM图像文件后,逐个打开DICOM图像文件,读取DICOM文件头中的(0028,0004)标签值,得到DICOM图像的光度解释度信息,读取DICOM文件头中的(0028,0011)标签值,得到该图像的的宽度,然后读取DICOM文件头中的(0028,0010)标签值,得到该图像的的高度,根据图像的宽度和高度值计算出该DICOM图像的宽高比值。
如果光度解释度信息是MONOCHROME1或是MONOCHROME2,则表示该图像是单色灰度图像,读取每个DICOM图像文件中的第一帧图像到内存,并按照一定尺寸大小并生成单色的图标图像后表示到浏览软件的缩略图图像预览表示窗口中。
如果该DICOM图像的光度解释度信息是RGB,则表示该图像是24位真彩色图像,读取每个DICOM图像文件中的第一帧彩色图像到内存,采用(5)中的方法生成256色的调色板,
并按照一定尺寸大小使用该调色板生成256色图标图像后表示到浏览软件的缩略图图像预览表示窗口中。
如果该DICOM图像的光度解释度信息是YBR_FULL、YBR_FULL_422,DICOM图像是JPEG压缩的彩色图像。读取图标图像对应的DICOM图像文件的第一帧的彩色图像数据到内存后转换为24位真彩色图像后,采用256色调色板,并按照一定尺寸大小使用该调色板生成256色图标图像后表示到浏览软件的缩略图图像预览表示窗口中。
如果该DICOM图像的光度解释度信息PALETTECOLOR,DICOM图像是带有调色板的彩色图像。读取图标图像对应的DICOM图像文件的第一帧的图像数据到内存后,采用256色调色板,并按照一定尺寸大小使用该调色板生成256色图标图像后表示到浏览软件的缩略图图像预览表示窗口中。
在实际应用中,DICOMDIR是一个可变长度迷你database文件。由group(0002,xxxx)和group(0004,xxxx)为主题,描述的是一个4层的树状结构(tree structure)。由患者(Patient),研究(Study),序列(Series)和图像(Image)构成。DICOM CD或是DVD中保存的DICOM 图像,通过DICOMDIR文件进行管理,并由DICOM图像浏览软件实现由DICOMDIR管理的DICOM图像的快速浏览。
(1)打开一张640兆的CD,该CD根目录下存在一个DICOMDIR文件,该DICOMDIR文件管理着16个DICOM图像文件。
打开该CD的根目录下的DICOMDIR文件,读取并搜索图标图像(0088,0200)标签,该DICOMDIR中寻找到了图标图像(0088,0200)标签。
从(0088,0200)图标序列标签中读取(0028,0004)(Photometric Interpretation)标签值,得到图标图像的光度解释度为'MONOCHROME2',表示图标图像为单色灰度图像,读取(0028,0011)(Columns)标签值,得到图标图像的行数为128,表示图标图像的宽度是128,读取(0028,0010)(Rows)标签值,得到图标图像的列数为96,表示图标图像的高度是96。
从打开的DICOMDIR文件中读取(0004,1500)标签,得到DICOM图像文件的路径为D:\\DCM\\DCM0001,打开该DICOM图像文件后,读取(0008,0060)(Modality)标签值,得到诊断装置信息是'US',表示该图像是超音波图像,读取(0028,0004)标签值,得到图标图像的光度解释度为'RGB',读取(0028,0008)(Number ofFrames)标签值,得到图像的帧数是80帧,表示该图像为80帧的24位彩色动画图像,读取(0028,0011)标签值,得到图标图像的行数为640,表示图标图像的宽度是640,读取(0028,0010)标签值,得到图标图像的列数为480,表示图标图像的高度是480。
(2)在(1)中得到的图标图像的宽高比是96/128=3/4,实际DICOM图像的宽高比也是640/480=3/4,宽高比是相同的。在(1)中得到的图标图像是单色灰度图像,实际DICOM图像是24位真彩色图像,为了图标图像快速预览表示时和实际DICOM的图像保持一致性,要计算得到实际DICOM图像的256色的调色板,使用该调色板改变图标图像为256色彩色图标图像。
八叉树颜色量化算法效率高、效果好的特点,使用八叉树颜色量化算 法实现24位真彩色转256色。
首先建立八叉树,八叉树节点的特性就是每个节点最多有8个字节点,编号为0~7。读取在(1)中得到的DICOM图像文件中的24位真彩色图像数据到内存,以图像各个像素的RGB值建立八叉树,首先建立根节点(Root),后分别以图像像素RGB的每一位分别组成一个0~7的值,依次插入树中。以像素RGB(123,54,78)为例,第一层到第八层的数值分别为0、5、6、6、5、3、7、4。以此类推,将所有的像素的RGB值逐层插入到八叉树中,在每个节点上,记录所有经过的节点的RGB值的总和,已及RGB颜色个数。插入的过程中,如果节点不存在,则需要创建新的节点,然后增加节点计数以及RGB各分量的总和.当在插入时,发现节点已经存在,且是叶子节点,则停止该颜色后续层数节点的插入。插入完一个颜色之后,如果叶子节点数超过了要得到的颜色数(256色需要得到256种颜色),需要合并节点了,使的叶子节点的个数不超过要得到的颜色数。由于越底层的节点,数据的敏感度越低,所以我们将从最底层的节点开始合并。按节点计数值小的优先合并策略,将其字节点的所有RGB分量以及节点计数全部记录到该节点中,并删除其所有子节点。依此进行,直到合并后的叶子数符合要求为止。
其次,按照上述的步骤插入完所有的颜色之后,便建立起一颗叶子节点不超过256的八叉树。此时,取出叶子节点中的RGB分量的平均值(分量总和/节点计数),即是得到的调色板颜色值,完成调色板的提取。
(3)从(1)中得到的(0088,0200)标签序列中逐个读取图标图像到内存后,使用(2)中得到的256色的调色板改变灰度图标图像为256色的彩色图像后,表示到浏览软件的缩略图图像表示窗口中,循环处理直到16个图像全部处理完毕。本实例16个DICOM图像的图标缩略图在1秒内完成表示,实现了阅览DICOMDIR时的缩略图图标的快速预览。
图4为本发明所提供的DICOMDIR文件的缩略图读取系统结构图,如图4所示,一种DICOMDIR文件的缩略图读取系统,其特征在于,包括:
DICOMDIR文件获取模块401,用于获取DICOMDIR文件;所述 DICOMDIR文件包括多张图标图像。
第一判断模块402,用于判断所述DICOMDIR文件中是否存在图标图像序列标签,得到第一判断结果。
第一标签值读取模块403,用于若所述第一判断结果表示为所述DICOMDIR文件中存在图标图像序列标签,读取每一张所述图标图像的第一标签值,并获取每一张所述图标图像对应的DICOM图像文件;所述第一标签值用于确定所述图标图像的第一图像参数;所述第一图像参数包括所述图标图像的宽度、高度以及图像色彩类别。
第二标签值读取模块404,用于读取所述DICOM图像文件的头信息中的第二标签值;所述第二标签值用于确定所述DICOM图像文件中DICOM图像的第二图像参数;所述第二图像参数包括所述DICOM图像文件中DICOM图像的宽度、高度以及图像色彩类别。
调整模块405,用于基于所述第二图像参数,调整所述第一图像参数,确定所述图标图像的缩略图,并表示至浏览软件的缩略图图像表示窗口中进行预览。
所述调整模块405具体包括:第二判断子模块,用于判断所述第一图像参数与所述第二图像参数是否一致,得到第二判断结果;预览模块子模块,用于若所述第二判断结果表示为所述第一图像参数与所述第二图像参数一致,逐个读取所述图标图像的缩略图至内存,并表示至浏览软件的缩略图图像表示窗口中进行预览;调整子模块,用于若所述第二判断结果表示为所述第一图像参数与所述第二图像参数不一致,调整所述第一图像参数,使得所述第一图像参数与所述第二图像参数一致。
所述调整子模块具体包括:宽高比调整单元,用于若所述第二判断结果表示为所述第一图像参数中的图像色彩类别与所述第二图像参数中的图像色彩类别一致,且所述第一图像参数中的宽高比与所述第二图像参数中的宽高比不一致,调整所述图标图像的宽高比,使得所述第一图像参数与所述第二图像参数一致;宽高比为宽度与高度的比值。
图像色彩类别调整单元,用于若所述第二判断结果表示为所述第一图像参数中的宽高比与所述第二图像参数中的宽高比一致,且所述第一图像 参数中的图像色彩类别与所述第二图像参数中的图像色彩类别不一致,生成彩色调色板,并根据所述彩色调色板调整所述图标图像的图像色彩类别,使得所述第一图像参数与所述第二图像参数一致;宽高比为宽度与高度的比值。
所述图像色彩类别调整单元具体包括:256色调色板确定子单元,用于利用流行色算法、中位切分算法以及八叉树颜色量化算法将24位真色彩图转换为256色的彩色图,确定256色调色板;所述256色调色板为彩色调色板;24位真彩色图获取子单元,用于获取所述图标图像的24位真彩色图;图像色彩类别调整子单元,用于根据所述彩色调色板调整所述24位真彩色图,以调整所述图标图像的图像色彩类别。
宽高比以及图像色彩类别调整单元,用于若所述第二判断结果表示为所述第一图像参数与所述第二图像参数均不一致,调整所述图标图像的宽高比的同时,生成彩色调色板以调整所述图标图像的色彩类别,使得所述第一图像参数与所述第二图像参数一致;宽高比为宽度与高度的比值。
图标图像生成模块406,用于若所述第一判断结果表示为所述DICOMDIR文件中不存在图标图像序列标签,读取所述DICOMDIR文件中DICOM图像文件,并根据所述DICOM图像文件,生成图标图像。
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的系统而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。
本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处。综上所述,本说明书内容不应理解为对本发明的限制。

Claims (8)

  1. 一种DICOMDIR文件的缩略图读取方法,其特征在于,包括:
    获取DICOMDIR文件;所述DICOMDIR文件包括多张图标图像;
    判断所述DICOMDIR文件中是否存在图标图像序列标签,得到第一判断结果;
    若所述第一判断结果表示为所述DICOMDIR文件中存在图标图像序列标签,读取每一张所述图标图像的第一标签值,并获取每一张所述图标图像对应的DICOM图像文件;所述第一标签值用于确定所述图标图像的第一图像参数;所述第一图像参数包括所述图标图像的宽度、高度以及图像色彩类别;
    读取所述DICOM图像文件的头信息中的第二标签值;所述第二标签值用于确定所述DICOM图像文件中DICOM图像的第二图像参数;所述第二图像参数包括所述DICOM图像文件中DICOM图像的宽度、高度以及图像色彩类别;
    基于所述第二图像参数,调整所述第一图像参数,确定所述图标图像的缩略图,并表示至浏览软件的缩略图图像表示窗口中进行预览;
    若所述第一判断结果表示为所述DICOMDIR文件中不存在图标图像序列标签,读取所述DICOMDIR文件中DICOM图像文件,并根据所述DICOM图像文件,生成图标图像。
  2. 根据权利要求1所述的DICOMDIR文件的缩略图读取方法,其特征在于,所述基于所述第二图像参数,调整所述第一图像参数,确定所述图标图像的缩略图,并表示至浏览软件的缩略图图像表示窗口中进行预览,具体包括:
    判断所述第一图像参数与所述第二图像参数是否一致,得到第二判断结果;
    若所述第二判断结果表示为所述第一图像参数与所述第二图像参数一致,逐个读取所述图标图像的缩略图至内存,并表示至浏览软件的缩略图图像表示窗口中进行预览;
    若所述第二判断结果表示为所述第一图像参数与所述第二图像参数 不一致,调整所述第一图像参数,使得所述第一图像参数与所述第二图像参数一致。
  3. 根据权利要求2所述的DICOMDIR文件的缩略图读取方法,其特征在于,所述调整所述第一图像参数,使得所述第一图像参数与所述第二图像参数一致,具体包括:
    若所述第二判断结果表示为所述第一图像参数中的图像色彩类别与所述第二图像参数中的图像色彩类别一致,且所述第一图像参数中的宽高比与所述第二图像参数中的宽高比不一致,调整所述图标图像的宽高比,使得所述第一图像参数与所述第二图像参数一致;宽高比为宽度与高度的比值;
    若所述第二判断结果表示为所述第一图像参数中的宽高比与所述第二图像参数中的宽高比一致,且所述第一图像参数中的图像色彩类别与所述第二图像参数中的图像色彩类别不一致,生成彩色调色板,并根据所述彩色调色板调整所述图标图像的图像色彩类别,使得所述第一图像参数与所述第二图像参数一致;宽高比为宽度与高度的比值;
    若所述第二判断结果表示为所述第一图像参数与所述第二图像参数均不一致,调整所述图标图像的宽高比的同时,生成彩色调色板以调整所述图标图像的色彩类别,使得所述第一图像参数与所述第二图像参数一致;宽高比为宽度与高度的比值。
  4. 根据权利要求3所述的DICOMDIR文件的缩略图读取方法,其特征在于,所述生成彩色调色板,并根据所述彩色调色板调整所述图标图像的图像色彩类别,具体包括:
    利用流行色算法、中位切分算法以及八叉树颜色量化算法将24位真色彩图转换为256色的彩色图,确定256色调色板;所述256色调色板为彩色调色板;
    获取所述图标图像的24位真彩色图;
    根据所述彩色调色板调整所述24位真彩色图,以调整所述图标图像的图像色彩类别。
  5. 一种DICOMDIR文件的缩略图读取系统,其特征在于,包括:
    DICOMDIR文件获取模块,用于获取DICOMDIR文件;所述DICOMDIR文件包括多张图标图像;
    第一判断模块,用于判断所述DICOMDIR文件中是否存在图标图像序列标签,得到第一判断结果;
    第一标签值读取模块,用于若所述第一判断结果表示为所述DICOMDIR文件中存在图标图像序列标签,读取每一张所述图标图像的第一标签值,并获取每一张所述图标图像对应的DICOM图像文件;所述第一标签值用于确定所述图标图像的第一图像参数;所述第一图像参数包括所述图标图像的宽度、高度以及图像色彩类别;
    第二标签值读取模块,用于读取所述DICOM图像文件的头信息中的第二标签值;所述第二标签值用于确定所述DICOM图像文件中DICOM图像的第二图像参数;所述第二图像参数包括所述DICOM图像文件中DICOM图像的宽度、高度以及图像色彩类别;
    调整模块,用于基于所述第二图像参数,调整所述第一图像参数,确定所述图标图像的缩略图,并表示至浏览软件的缩略图图像表示窗口中进行预览;
    图标图像生成模块,用于若所述第一判断结果表示为所述DICOMDIR文件中不存在图标图像序列标签,读取所述DICOMDIR文件中DICOM图像文件,并根据所述DICOM图像文件,生成图标图像。
  6. 根据权利要求5所述的DICOMDIR文件的缩略图读取系统,其特征在于,所述调整模块具体包括:
    第二判断子模块,用于判断所述第一图像参数与所述第二图像参数是否一致,得到第二判断结果;
    预览模块子模块,用于若所述第二判断结果表示为所述第一图像参数与所述第二图像参数一致,逐个读取所述图标图像的缩略图至内存,并表示至浏览软件的缩略图图像表示窗口中进行预览;
    调整子模块,用于若所述第二判断结果表示为所述第一图像参数与所述第二图像参数不一致,调整所述第一图像参数,使得所述第一图像参数与所述第二图像参数一致。
  7. 根据权利要求6所述的DICOMDIR文件的缩略图读取系统,其特征在于,所述调整子模块具体包括:
    宽高比调整单元,用于若所述第二判断结果表示为所述第一图像参数中的图像色彩类别与所述第二图像参数中的图像色彩类别一致,且所述第一图像参数中的宽高比与所述第二图像参数中的宽高比不一致,调整所述图标图像的宽高比,使得所述第一图像参数与所述第二图像参数一致;宽高比为宽度与高度的比值;
    图像色彩类别调整单元,用于若所述第二判断结果表示为所述第一图像参数中的宽高比与所述第二图像参数中的宽高比一致,且所述第一图像参数中的图像色彩类别与所述第二图像参数中的图像色彩类别不一致,生成彩色调色板,并根据所述彩色调色板调整所述图标图像的图像色彩类别,使得所述第一图像参数与所述第二图像参数一致;宽高比为宽度与高度的比值;
    宽高比以及图像色彩类别调整单元,用于若所述第二判断结果表示为所述第一图像参数与所述第二图像参数均不一致,调整所述图标图像的宽高比的同时,生成彩色调色板以调整所述图标图像的色彩类别,使得所述第一图像参数与所述第二图像参数一致;宽高比为宽度与高度的比值。
  8. 根据权利要求7所述的DICOMDIR文件的缩略图读取系统,其特征在于,所述图像色彩类别调整单元具体包括:
    256色调色板确定子单元,用于利用流行色算法、中位切分算法以及八叉树颜色量化算法将24位真色彩图转换为256色的彩色图,确定256色调色板;所述256色调色板为彩色调色板;
    24位真彩色图获取子单元,用于获取所述图标图像的24位真彩色图;
    图像色彩类别调整子单元,用于根据所述彩色调色板调整所述24位真彩色图,以调整所述图标图像的图像色彩类别。
PCT/CN2021/120849 2020-09-27 2021-09-27 Dicomdir文件的缩略图读取方法及系统 WO2022063287A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011029089.6A CN112151150B (zh) 2020-09-27 2020-09-27 一种dicomdir文件的缩略图读取方法及系统
CN202011029089.6 2020-09-27

Publications (1)

Publication Number Publication Date
WO2022063287A1 true WO2022063287A1 (zh) 2022-03-31

Family

ID=73894147

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/120849 WO2022063287A1 (zh) 2020-09-27 2021-09-27 Dicomdir文件的缩略图读取方法及系统

Country Status (2)

Country Link
CN (1) CN112151150B (zh)
WO (1) WO2022063287A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116664960A (zh) * 2023-07-28 2023-08-29 深圳弗瑞奇科技有限公司 一种基于图像处理的猫便识别方法

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112151150B (zh) * 2020-09-27 2023-09-26 周兴祥 一种dicomdir文件的缩略图读取方法及系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090103789A1 (en) * 2007-10-23 2009-04-23 Proscan Imaging, Llc Delivering and receiving medical images
US20170219705A1 (en) * 2016-02-03 2017-08-03 Toshiba Medical Systems Corporation Ultrasonic diagnosis apparatus and storage medium
CN107145730A (zh) * 2017-04-27 2017-09-08 广州慧扬健康科技有限公司 Dicom医学影像文件读取适配系统
CN112151150A (zh) * 2020-09-27 2020-12-29 周兴祥 一种dicomdir文件的缩略图读取方法及系统

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101350923B (zh) * 2008-09-03 2010-11-17 中国科学院上海技术物理研究所 一种交互式医学图像通信与显示方法
US9262444B2 (en) * 2010-11-24 2016-02-16 General Electric Company Systems and methods for applying series level operations and comparing images using a thumbnail navigator
JP5972533B2 (ja) * 2011-06-15 2016-08-17 東芝メディカルシステムズ株式会社 画像処理システム及び方法
JP5315424B2 (ja) * 2012-01-23 2013-10-16 キヤノン株式会社 画像表示制御装置及びその制御方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090103789A1 (en) * 2007-10-23 2009-04-23 Proscan Imaging, Llc Delivering and receiving medical images
US20170219705A1 (en) * 2016-02-03 2017-08-03 Toshiba Medical Systems Corporation Ultrasonic diagnosis apparatus and storage medium
CN107145730A (zh) * 2017-04-27 2017-09-08 广州慧扬健康科技有限公司 Dicom医学影像文件读取适配系统
CN112151150A (zh) * 2020-09-27 2020-12-29 周兴祥 一种dicomdir文件的缩略图读取方法及系统

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
WU, JIE: "Design of Image Workstation of Digital Mammography Machine Based on DICOM", CHINESE MASTER’S THESES FULL-TEXT DATABASE, no. 01, 30 April 2009 (2009-04-30), XP055915446 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116664960A (zh) * 2023-07-28 2023-08-29 深圳弗瑞奇科技有限公司 一种基于图像处理的猫便识别方法

Also Published As

Publication number Publication date
CN112151150A (zh) 2020-12-29
CN112151150B (zh) 2023-09-26

Similar Documents

Publication Publication Date Title
WO2022063287A1 (zh) Dicomdir文件的缩略图读取方法及系统
US8200669B1 (en) Management of smart tags via hierarchy
US7813557B1 (en) Tagging detected objects
US8589402B1 (en) Generation of smart tags to locate elements of content
US7636450B1 (en) Displaying detected objects to indicate grouping
US20050190994A1 (en) Image processing apparatus and program storage medium
US7725837B2 (en) Digital image browser
JP3454764B2 (ja) 内容ベースで映像を検索する検索システム及び検索方法
US8259995B1 (en) Designating a tag icon
US20110234841A1 (en) Storage and Transmission of Pictures Including Multiple Frames
US20050044100A1 (en) Method and system for visualization and operation of multiple content filters
US7813526B1 (en) Normalizing detected objects
WO2022052884A1 (zh) 含有图标图像的dicomdir文件生成方法及系统
WO2014174739A1 (ja) 医用画像データ情報交換システム
US6789088B1 (en) Multimedia description scheme having weight information and method for displaying multimedia
WO2012137404A1 (ja) 動画サムネイル表示装置及び動画サムネイル表示方法
CN110740290B (zh) 监控录像预览方法及装置
US9442945B2 (en) File system manager using tagging organization
TWI426402B (zh) 影片搜尋方法
JP2009217828A (ja) 画像検索装置
US20090313263A1 (en) Multi-Media Server
JP4612856B2 (ja) 情報処理装置及びその制御方法
US6947061B2 (en) Method of displaying an image
WO2003016054A9 (en) Easy printing of visual images extracted from a collection of visual images
JP2001157146A (ja) 画像情報処理装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21871656

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21871656

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 21871656

Country of ref document: EP

Kind code of ref document: A1