CN112071403B - Method and system for generating DICOMDIR files containing icon images - Google Patents
Method and system for generating DICOMDIR files containing icon images Download PDFInfo
- Publication number
- CN112071403B CN112071403B CN202010942421.1A CN202010942421A CN112071403B CN 112071403 B CN112071403 B CN 112071403B CN 202010942421 A CN202010942421 A CN 202010942421A CN 112071403 B CN112071403 B CN 112071403B
- Authority
- CN
- China
- Prior art keywords
- image
- dicom
- icon
- color
- color image
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 37
- 239000003086 colorant Substances 0.000 claims abstract description 39
- 238000013139 quantization Methods 0.000 claims description 18
- 230000006835 compression Effects 0.000 claims description 12
- 238000007906 compression Methods 0.000 claims description 12
- 238000000605 extraction Methods 0.000 claims description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000003384 imaging method Methods 0.000 description 3
- 238000004364 calculation method Methods 0.000 description 2
- 229940079593 drug Drugs 0.000 description 2
- 239000003814 drug Substances 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 238000002604 ultrasonography Methods 0.000 description 2
- 238000002583 angiography Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G16—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
- G16H—HEALTHCARE INFORMATICS, i.e. INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR THE HANDLING OR PROCESSING OF MEDICAL OR HEALTHCARE DATA
- G16H30/00—ICT specially adapted for the handling or processing of medical images
- G16H30/20—ICT specially adapted for the handling or processing of medical images for handling medical images, e.g. DICOM, HL7 or PACS
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Health & Medical Sciences (AREA)
- Nuclear Medicine, Radiotherapy & Molecular Imaging (AREA)
- Radiology & Medical Imaging (AREA)
- Engineering & Computer Science (AREA)
- Epidemiology (AREA)
- General Health & Medical Sciences (AREA)
- Medical Informatics (AREA)
- Primary Health Care (AREA)
- Public Health (AREA)
- Measuring And Recording Apparatus For Diagnosis (AREA)
- Processing Or Creating Images (AREA)
Abstract
Description
技术领域Technical field
本发明涉及医学影像处理技术领域,特别是涉及一种含有图标图像的DICOMDIR文件生成方法及系统。The present invention relates to the technical field of medical image processing, and in particular to a method and system for generating DICOMDIR files containing icon images.
背景技术Background technique
目前在医院中,CT、核磁共振、血管造影诊断装置和超音波诊断装置等产生的医学DICOM(Digital Imaging and Communications in Medicine,医学数字成像和通信)影像,可以在便携式的CD或是DVD媒体上保存为DICOM图像,交给患者保管或是转院时交给其他第三方医疗机构,实现了无胶片化管理。Currently in hospitals, medical DICOM (Digital Imaging and Communications in Medicine) images generated by CT, MRI, angiography diagnostic equipment and ultrasound diagnostic equipment can be stored on portable CD or DVD media. Save it as a DICOM image and hand it over to the patient for safekeeping or to other third-party medical institutions when transferring to another hospital, realizing film-free management.
通常保存到CD或是DVD上的DICOM图像,通过DICOMDIR(Digital Imaging andCommunications in Medicine Directory,医学目录中的数字成像与通信)文件进行管理,并可以通过影像浏览软件浏览CD或是DVD中的DICOM图像。DICOM images usually saved to CD or DVD are managed through DICOMDIR (Digital Imaging and Communications in Medicine Directory, Digital Imaging and Communications in Medical Directory) files, and the DICOM images in CD or DVD can be browsed through image browsing software. .
使用DICOM图像浏览软件浏览CD或是DVD中的DICOM图像时,通常首先在浏览软件的图像表示窗口中表示出全部的DICOM图像的图标图像(ICON)进行预览,选择一个或是多个DICOM图像表示到屏幕上后做详细观察及诊断。DICOM图像浏览软件实现DICOM图像的图标图像进行预览时,通常是从DICOMDIR文件中查询和搜索到各个DICOM文件的名称后,打开并读取各个DICOM图像文件生成图标图像后在浏览软件的图像表示窗口中表示。当CD或是DVD中存在的DICOMDIR文件管理的图像个数很多时,生成图标图像需要的时间很长,有时生成及表示一个CD或是DVD中的全部DICOM图像的图标图像需要20秒以上,导致医务工作人员DICOM图像的预览效率低下。When using DICOM image browsing software to browse DICOM images on CD or DVD, you usually first preview the icon images (ICONs) of all DICOM images in the image display window of the browsing software, and select one or more DICOM images to display. Go to the screen for detailed observation and diagnosis. When the DICOM image browsing software realizes the preview of the icon image of the DICOM image, it usually queries and searches for the name of each DICOM file from the DICOMDIR file, then opens and reads each DICOM image file to generate the icon image, and then displays the image in the image representation window of the browsing software. expressed in. When there are a large number of images managed by DICOMDIR files in a CD or DVD, it takes a long time to generate icon images. Sometimes it takes more than 20 seconds to generate and represent icon images for all DICOM images in a CD or DVD, resulting in The preview of DICOM images for medical staff is inefficient.
发明内容Contents of the invention
本发明的目的是提供一种含有图标图像的DICOMDIR文件生成方法及系统,能够实现DICOM图像的快速预览,提高医务人员的工作效率。The purpose of the present invention is to provide a method and system for generating DICOM DIR files containing icon images, which can realize rapid preview of DICOM images and improve the work efficiency of medical personnel.
为实现上述目的,本发明提供了如下方案:In order to achieve the above objects, the present invention provides the following solutions:
一种含有图标图像的DICOMDIR文件生成方法,包括:A method for generating DICOMDIR files containing icon images, including:
获取DICOM图像文件;所述DICOM图像文件包括多个DICOM图像;Obtain a DICOM image file; the DICOM image file includes multiple DICOM images;
选取一个DICOM图像,并对所述DICOM图像进行压缩处理,得到图标图像;Select a DICOM image and compress the DICOM image to obtain an icon image;
判断所述DICOM图像为灰度图还是彩色图,得到第一判断结果;Determine whether the DICOM image is a grayscale image or a color image, and obtain a first judgment result;
若所述第一判断结果为彩色图,提取所述DICOM图像的三种颜色的调色板数据;将所述DICOM图像对应的图标图像、所述图标图像的高度和宽度以及与所述图标图像对应的调色板数据保存在DICOMDIR文件中;其中,三种颜色分别为红、绿和蓝;所述图标图像保存在图标图像序列标签中;If the first judgment result is a color image, extract the palette data of the three colors of the DICOM image; compare the icon image corresponding to the DICOM image, the height and width of the icon image, and the icon image The corresponding palette data is saved in the DICOMDIR file; among them, the three colors are red, green and blue respectively; the icon image is saved in the icon image sequence tag;
若所述第一判断结果为灰度图,将所述DICOM图像对应的图标图像以及所述图标图像的高度和宽度保存在DICOMDIR文件中;If the first judgment result is a grayscale image, save the icon image corresponding to the DICOM image and the height and width of the icon image in a DICOMDIR file;
判断是否选取完所述DICOM图像文件中所有的DICOM图像,得到第二判断结果;Determine whether all DICOM images in the DICOM image file have been selected, and obtain a second judgment result;
若所述第二判断结果为是,则得到含有图标图像的DICOMDIR文件;If the second judgment result is yes, a DICOMDIR file containing the icon image is obtained;
若所述第二判断结果为否,则返回步骤“选取一个DICOM图像,并对所述DICOM图像进行压缩处理,得到图标图像”。If the second judgment result is no, return to step "select a DICOM image and compress the DICOM image to obtain an icon image."
可选的,所述对所述DICOM图像进行压缩处理,得到图标图像,具体包括:Optionally, compressing the DICOM image to obtain an icon image specifically includes:
获取图像图标预设宽度;Get the default width of the image icon;
提取所述DICOM图像的宽度和高度,并根据所述DICOM图像的宽度和高度确定宽高比;Extract the width and height of the DICOM image, and determine the aspect ratio based on the width and height of the DICOM image;
根据所述图像图标预设宽度和所述宽高比计算图像图标高度;Calculate the height of the image icon according to the preset width of the image icon and the aspect ratio;
根据所述图像图标预设宽度和所述图像图标高度对所述DICOM图像进行压缩处理,得到图标图像。The DICOM image is compressed according to the preset width of the image icon and the height of the image icon to obtain an icon image.
可选的,所述判断所述DICOM图像为灰度图还是彩色图,具体包括:Optionally, determining whether the DICOM image is a grayscale image or a color image specifically includes:
提取所述DICOM图像的光度解释度信息;Extract photometric interpretability information of the DICOM image;
根据所述光度解释度信息判断所述DICOM图像为灰度图还是彩色图;Determine whether the DICOM image is a grayscale image or a color image based on the photometric interpretability information;
其中,in,
所述彩色图包括24位真彩色图像、JPEG压缩的彩色图像和带有调色板的彩色图像;The color images include 24-bit true color images, JPEG compressed color images and color images with color palettes;
当所述光度解释度信息为“MONOCHROME1”或“MONOCHROME2”时,所述DICOM图像为灰度图;When the photometric interpretation information is "MONOCHROME1" or "MONOCHROME2", the DICOM image is a grayscale image;
当所述光度解释度信息为“RGB”时,所述DICOM图像为24位真彩色图像;When the photometric interpretation information is "RGB", the DICOM image is a 24-bit true color image;
当所述光度解释度信息为“YBR_FULL”或“YBR_FULL_422”时,所述DICOM图像为JPEG压缩的彩色图像;When the photometric interpretation information is "YBR_FULL" or "YBR_FULL_422", the DICOM image is a JPEG compressed color image;
当所述光度解释度信息为“PALETTE COLOR”时,所述DICOM图像为带有调色板的彩色图像。When the photometric interpretation information is "PALETTE COLOR", the DICOM image is a color image with a palette.
可选的,所述提取所述DICOM图像的三种颜色的调色板数据,具体包括:Optionally, the extraction of palette data of three colors of the DICOM image specifically includes:
在所述彩色图为24位真彩色图像时,采用八叉树颜色量化方法将所述24位真彩色图像转换为256色彩色图,得到第一彩色图,然后提取所述第一彩色图的三种颜色的调色板数据;When the color image is a 24-bit true color image, the octree color quantization method is used to convert the 24-bit true color image into a 256-color color image to obtain the first color image, and then extract the Palette data for three colors;
在所述彩色图为JPEG压缩的彩色图像时,将所述JPEG压缩的彩色图像先转换为24位真彩色图像,再采用八叉树颜色量化方法转换为256色彩色图,得到第二彩色图,然后提取所述第二彩色图的三种颜色的调色板数据;When the color image is a JPEG compressed color image, the JPEG compressed color image is first converted into a 24-bit true color image, and then converted into a 256-color color image using an octree color quantization method to obtain a second color image. , and then extract the palette data of the three colors of the second color image;
在所述彩色图为带有调色板的彩色图像,提取所述带有调色板的彩色图像的三种颜色的调色板数据。When the color image is a color image with a palette, palette data of three colors of the color image with a palette is extracted.
可选的,optional,
在所述将所述DICOM图像对应的图标图像、所述图标图像的高度和宽度以及与所述图标图像对应的调色板数据保存在DICOMDIR文件中,之后还包括:The step of saving the icon image corresponding to the DICOM image, the height and width of the icon image, and the palette data corresponding to the icon image in the DICOMDIR file also includes:
确定所述DICOM图像对应的图标图像的光度解释度信息为PALETTE COLOR,并将所述DICOM图像对应的图标图像的光度解释度信息保存在DICOMDIR文件中;Determine that the photometric interpretability information of the icon image corresponding to the DICOM image is PALETTE COLOR, and save the photometric interpretability information of the icon image corresponding to the DICOM image in the DICOMDIR file;
在所述将所述DICOM图像对应的图标图像以及所述图标图像的高度和宽度保存在DICOMDIR文件中,之后还包括:After saving the icon image corresponding to the DICOM image and the height and width of the icon image in the DICOMDIR file, it also includes:
确定所述DICOM图像对应的图标图像的光度解释度信息为MONOCHROME2,并将所述DICOM图像对应的图标图像的光度解释度信息保存在DICOMDIR文件中。The photometric interpretability information of the icon image corresponding to the DICOM image is determined to be MONOCHROME2, and the photometric interpretability information of the icon image corresponding to the DICOM image is saved in the DICOMDIR file.
本发明还提供一种含有图标图像的DICOMDIR文件生成系统,包括:The present invention also provides a DICOMDIR file generation system containing icon images, including:
DICOM图像文件获取模块,用于获取DICOM图像文件;所述DICOM图像文件包括多个DICOM图像;DICOM image file acquisition module, used to acquire DICOM image files; the DICOM image files include multiple DICOM images;
图像压缩模块,用于选取一个DICOM图像,并对所述DICOM图像进行压缩处理,得到图标图像;An image compression module, used to select a DICOM image and compress the DICOM image to obtain an icon image;
第一判断模块,用于判断所述DICOM图像为灰度图还是彩色图,得到第一判断结果;在所述第一判断结果为彩色图时,执行彩色图处理模块;在所述第一判断结果为灰度图时,执行灰度图处理模块;The first judgment module is used to judge whether the DICOM image is a grayscale image or a color image, and obtain a first judgment result; when the first judgment result is a color image, execute the color image processing module; in the first judgment When the result is a grayscale image, execute the grayscale image processing module;
所述彩色图处理模块,用于提取所述DICOM图像的三种颜色的调色板数据;将所述DICOM图像对应的图标图像、所述图标图像的高度和宽度以及与所述图标图像对应的调色板数据保存在DICOMDIR文件中;其中,三种颜色分别为红、绿和蓝;所述图标图像保存在图标图像序列标签中;The color image processing module is used to extract palette data of three colors of the DICOM image; convert the icon image corresponding to the DICOM image, the height and width of the icon image, and the icon image corresponding to the icon image. The palette data is saved in the DICOMDIR file; the three colors are red, green and blue respectively; the icon image is saved in the icon image sequence tag;
所述灰度图处理模块,用于将所述DICOM图像对应的图标图像以及所述图标图像的高度和宽度保存在DICOMDIR文件中;The grayscale image processing module is used to save the icon image corresponding to the DICOM image and the height and width of the icon image in a DICOMDIR file;
第二判断模块,用于判断是否选取完所述DICOM图像文件中所有的DICOM图像,得到第二判断结果;在所述第二判断结果为是时,执行DICOMDIR文件生成模块,在所述第二判断结果为否时,执行所述图像压缩模块;The second judgment module is used to judge whether all DICOM images in the DICOM image file have been selected and obtain the second judgment result; when the second judgment result is yes, execute the DICOMDIR file generation module. When the judgment result is no, execute the image compression module;
所述DICOMDIR文件生成模块,用于得到含有图标图像的DICOMDIR文件。The DICOMDIR file generation module is used to obtain a DICOMDIR file containing an icon image.
可选的,所述图像压缩模块,具体包括:Optional, the image compression module specifically includes:
预设宽度获取单元,用于获取图像图标预设宽度;The preset width acquisition unit is used to obtain the preset width of the image icon;
宽高比确定单元,用于提取所述DICOM图像的宽度和高度,并根据所述DICOM图像的宽度和高度确定宽高比;An aspect ratio determination unit, configured to extract the width and height of the DICOM image, and determine the aspect ratio based on the width and height of the DICOM image;
图像图标高度计算单元,用于根据所述图像图标预设宽度和所述宽高比计算图像图标高度;An image icon height calculation unit, configured to calculate the image icon height according to the preset width of the image icon and the aspect ratio;
图标图像生成单元,用于根据所述图像图标预设宽度和所述图像图标高度对所述DICOM图像进行压缩处理,得到图标图像。An icon image generating unit is configured to compress the DICOM image according to the preset width of the image icon and the height of the image icon to obtain an icon image.
可选的,所述第一判断模块,具体包括:Optionally, the first judgment module specifically includes:
光度解释度信息提取单元,用于提取所述DICOM图像的光度解释度信息;A photometric interpretability information extraction unit, used to extract photometric interpretability information of the DICOM image;
第一判断单元,用于根据所述光度解释度信息判断所述DICOM图像为灰度图还是彩色图;A first judgment unit configured to judge whether the DICOM image is a grayscale image or a color image based on the photometric interpretation information;
其中,in,
所述彩色图包括24位真彩色图像、JPEG压缩的彩色图像和带有调色板的彩色图像;The color images include 24-bit true color images, JPEG compressed color images and color images with color palettes;
当所述光度解释度信息为“MONOCHROME1”或“MONOCHROME2”时,所述DICOM图像为灰度图;When the photometric interpretation information is "MONOCHROME1" or "MONOCHROME2", the DICOM image is a grayscale image;
当所述光度解释度信息为“RGB”时,所述DICOM图像为24位真彩色图像;When the photometric interpretation information is "RGB", the DICOM image is a 24-bit true color image;
当所述光度解释度信息为“YBR_FULL”或“YBR_FULL_422”时,所述DICOM图像为JPEG压缩的彩色图像;When the photometric interpretation information is "YBR_FULL" or "YBR_FULL_422", the DICOM image is a JPEG compressed color image;
当所述光度解释度信息为“PALETTE COLOR”时,所述DICOM图像为带有调色板的彩色图像。When the photometric interpretation information is "PALETTE COLOR", the DICOM image is a color image with a palette.
可选的,所述彩色图处理模块,具体包括:Optionally, the color image processing module specifically includes:
第一调色板数据生成单元,用于在所述彩色图为24位真彩色图像时,采用八叉树颜色量化方法将所述24位真彩色图像转换为256色彩色图,得到第一彩色图,然后提取所述第一彩色图的三种颜色的调色板数据;The first palette data generating unit is configured to use an octree color quantization method to convert the 24-bit true color image into a 256-color color image when the color image is a 24-bit true color image to obtain the first color image. image, and then extract palette data of three colors of the first color image;
第二调色板数据生成单元,用于在所述彩色图为JPEG压缩的彩色图像时,将所述JPEG压缩的彩色图像先转换为24位真彩色图像,再采用八叉树颜色量化方法转换为256色彩色图,得到第二彩色图,然后提取所述第二彩色图的三种颜色的调色板数据;The second palette data generation unit is configured to, when the color image is a JPEG compressed color image, first convert the JPEG compressed color image into a 24-bit true color image, and then convert it using an octree color quantization method. For a 256-color color map, obtain a second color map, and then extract palette data of three colors of the second color map;
第三调色板数据生成单元,用于在所述彩色图为带有调色板的彩色图像,提取所述带有调色板的彩色图像的三种颜色的调色板数据。A third palette data generating unit is configured to extract palette data of three colors of the color image with a palette when the color image is a color image with a palette.
可选的,所述系统,还包括:Optionally, the system also includes:
第一光度解释度信息保存模块,用于确定所述DICOM图像对应的图标图像的光度解释度信息为PALETTE COLOR,并将所述DICOM图像对应的图标图像的光度解释度信息保存在DICOMDIR文件中;A first photometric interpretability information saving module, configured to determine that the photometric interpretability information of the icon image corresponding to the DICOM image is PALETTE COLOR, and save the photometric interpretability information of the icon image corresponding to the DICOM image in a DICOMDIR file;
第二光度解释度信息保存模块,用于确定所述DICOM图像对应的图标图像的光度解释度信息为MONOCHROME2,并将所述DICOM图像对应的图标图像的光度解释度信息保存在DICOMDIR文件中。The second photometric interpretation information saving module is used to determine the photometric interpretation information of the icon image corresponding to the DICOM image as MONOCHROME2, and save the photometric interpretation information of the icon image corresponding to the DICOM image in the DICOMDIR file.
与现有技术相比,本发明的有益效果是:Compared with the prior art, the beneficial effects of the present invention are:
本发明提出了一种含有图标图像的DICOMDIR文件生成方法及系统,获取DICOM图像文件;选取一个DICOM图像,并对DICOM图像进行压缩处理,得到图标图像;判断DICOM图像为灰度图还是彩色图,若为彩色图,则提取DICOM图像的三种颜色的调色板数据,并将DICOM图像对应的图标图像、图标图像的高度和宽度以及与图标图像对应的调色板数据保存在DICOMDIR文件中;若为灰度图,则将DICOM图像对应的图标图像以及图标图像的高度和宽度保存在DICOMDIR文件中。本发明在DICOMDIR文件生成时,预先把DICOMDIR需要管理的DICOM的图像的图标图像做成并保存到图标图像序列标签中,在使用DICOM图像浏览软件实现DICOMDIR中管理的DICOM图像进行图标图像阅览时,不需要打开各个DICOM图像读取图像数据生成图标图像,浏览软件直接读取图标图像序列中的图标图像,即可实现DICOM图像的快速预览,提高医务人员的工作效率。The invention proposes a method and system for generating DICOMDIR files containing icon images to obtain DICOM image files; select a DICOM image and perform compression processing on the DICOM image to obtain an icon image; determine whether the DICOM image is a grayscale image or a color image, If it is a color image, extract the palette data of the three colors of the DICOM image, and save the icon image corresponding to the DICOM image, the height and width of the icon image, and the palette data corresponding to the icon image in the DICOMDIR file; If it is a grayscale image, save the icon image corresponding to the DICOM image and the height and width of the icon image in the DICOMDIR file. When the DICOMDIR file is generated in the present invention, the icon image of the DICOM image that DICOMDIR needs to be managed is made in advance and saved in the icon image sequence tag. When the DICOM image browsing software is used to realize the icon image reading of the DICOM image managed in DICOMDIR, There is no need to open each DICOM image to read the image data to generate an icon image. The browsing software directly reads the icon image in the icon image sequence, which can realize a quick preview of the DICOM image and improve the work efficiency of medical personnel.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the drawings needed to be used in the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some of the drawings of the present invention. Embodiments, for those of ordinary skill in the art, other drawings can also be obtained based on these drawings without exerting creative efforts.
图1为本发明实施例中含有图标图像的DICOMDIR文件生成方法流程图;Figure 1 is a flow chart of a method for generating DICOMDIR files containing icon images in an embodiment of the present invention;
图2为本发明实施例八叉树算法生成256色调色板示意图;Figure 2 is a schematic diagram of a 256-color palette generated by an octree algorithm according to an embodiment of the present invention;
图3为本发明实施例中含有图标图像的DICOMDIR文件生成系统结构图。Figure 3 is a structural diagram of a DICOMDIR file generation system containing icon images in an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present invention.
本发明的目的是提供一种含有图标图像的DICOMDIR文件生成方法及系统,能够实现DICOM图像的快速预览,提高医务人员的工作效率。The purpose of the present invention is to provide a method and system for generating DICOM DIR files containing icon images, which can realize rapid preview of DICOM images and improve the work efficiency of medical personnel.
为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。In order to make the above objects, features and advantages of the present invention more obvious and understandable, the present invention will be described in further detail below in conjunction with the accompanying drawings and specific embodiments.
实施例Example
图1为本发明实施例中含有图标图像的DICOMDIR文件生成方法流程图,如图1所示,一种含有图标图像的DICOMDIR文件生成方法,包括:Figure 1 is a flow chart of a method for generating a DICOMDIR file containing icon images in an embodiment of the present invention. As shown in Figure 1, a method for generating a DICOMDIR file containing icon images includes:
步骤101:获取DICOM图像文件;DICOM图像文件包括多个DICOM图像;Step 101: Obtain a DICOM image file; a DICOM image file includes multiple DICOM images;
步骤102:选取一个DICOM图像,并对DICOM图像进行压缩处理,得到图标图像;Step 102: Select a DICOM image and compress the DICOM image to obtain an icon image;
步骤102,具体包括:Step 102 specifically includes:
获取图像图标预设宽度;Get the default width of the image icon;
提取DICOM图像的宽度和高度,并根据DICOM图像的宽度和高度确定宽高比;Extract the width and height of the DICOM image, and determine the aspect ratio based on the width and height of the DICOM image;
根据图像图标预设宽度和宽高比计算图像图标高度;Calculate the height of the image icon based on the preset width and aspect ratio of the image icon;
根据图像图标预设宽度和图像图标高度对DICOM图像进行压缩处理,得到图标图像。The DICOM image is compressed according to the preset width of the image icon and the height of the image icon to obtain the icon image.
步骤103:判断DICOM图像为灰度图还是彩色图,得到第一判断结果;若第一判断结果为彩色图,则执行步骤104;若第一判断结果为灰度图,则执行步骤105。Step 103: Determine whether the DICOM image is a grayscale image or a color image, and obtain a first judgment result; if the first judgment result is a color image, execute step 104; if the first judgment result is a grayscale image, execute step 105.
步骤103,具体包括:Step 103 specifically includes:
提取DICOM图像的光度解释度信息;Extract photometric interpretability information from DICOM images;
根据光度解释度信息判断DICOM图像为灰度图还是彩色图;Determine whether the DICOM image is grayscale or color based on photometric interpretation information;
其中,in,
彩色图包括24位真彩色图像、JPEG压缩的彩色图像和带有调色板的彩色图像;Color images include 24-bit true color images, JPEG compressed color images, and color images with palettes;
当光度解释度信息为“MONOCHROME1”(单色1)或“MONOCHROME2”(单色2)时,DICOM图像为灰度图;When the photometric interpretation information is "MONOCHROME1" (monochrome 1) or "MONOCHROME2" (monochrome 2), the DICOM image is a grayscale image;
当光度解释度信息为“RGB”时,DICOM图像为24位真彩色图像;When the photometric interpretation information is "RGB", the DICOM image is a 24-bit true color image;
当光度解释度信息为“YBR_FULL”或“YBR_FULL_422”时,DICOM图像为JPEG压缩的彩色图像;When the photometric interpretation information is "YBR_FULL" or "YBR_FULL_422", the DICOM image is a JPEG compressed color image;
当光度解释度信息为“PALETTE COLOR”(调色板颜色)时,DICOM图像为带有调色板的彩色图像。When the photometric interpretation information is "PALETTE COLOR" (palette color), the DICOM image is a color image with a palette.
步骤104:提取DICOM图像的三种颜色的调色板数据;将DICOM图像对应的图标图像、图标图像的高度和宽度以及与图标图像对应的调色板数据保存在DICOMDIR文件中;其中,三种颜色分别为红、绿和蓝;图标图像保存在图标图像序列标签中。Step 104: Extract the palette data of the three colors of the DICOM image; save the icon image corresponding to the DICOM image, the height and width of the icon image, and the palette data corresponding to the icon image in the DICOMDIR file; among them, three The colors are red, green, and blue; the icon image is saved in the icon image sequence tag.
同时,确定DICOM图像对应的图标图像的光度解释度信息为PALETTE COLOR,并将DICOM图像对应的图标图像的光度解释度信息保存在DICOMDIR文件中。At the same time, it is determined that the photometric interpretability information of the icon image corresponding to the DICOM image is PALETTE COLOR, and the photometric interpretability information of the icon image corresponding to the DICOM image is saved in the DICOMDIR file.
步骤104,具体包括:Step 104 specifically includes:
在彩色图为24位真彩色图像时,采用八叉树颜色量化方法将24位真彩色图像转换为256色彩色图,得到第一彩色图,然后提取第一彩色图的三种颜色的调色板数据;When the color image is a 24-bit true color image, the octree color quantization method is used to convert the 24-bit true color image into a 256-color color image to obtain the first color image, and then extract the toning of the three colors of the first color image. board data;
在彩色图为JPEG压缩的彩色图像时,将JPEG压缩的彩色图像先转换为24位真彩色图像,再采用八叉树颜色量化方法转换为256色彩色图,得到第二彩色图,然后提取第二彩色图的三种颜色的调色板数据;When the color image is a JPEG-compressed color image, the JPEG-compressed color image is first converted into a 24-bit true color image, and then converted into a 256-color color image using the octree color quantization method to obtain the second color image, and then the second color image is extracted. Palette data for three colors of a two-color image;
在彩色图为带有调色板的彩色图像,提取带有调色板的彩色图像的三种颜色的调色板数据。In the color image, for a color image with a palette, the palette data of three colors of the color image with a palette is extracted.
步骤105:将DICOM图像对应的图标图像以及图标图像的高度和宽度保存在DICOMDIR文件中。Step 105: Save the icon image corresponding to the DICOM image and the height and width of the icon image in the DICOMDIR file.
同时,确定DICOM图像对应的图标图像的光度解释度信息为MONOCHROME2,并将DICOM图像对应的图标图像的光度解释度信息保存在DICOMDIR文件中。At the same time, it is determined that the photometric interpretability information of the icon image corresponding to the DICOM image is MONOCHROME2, and the photometric interpretability information of the icon image corresponding to the DICOM image is saved in the DICOMDIR file.
步骤106:判断是否选取完DICOM图像文件中所有的DICOM图像,得到第二判断结果;若第二判断结果为是,则执行步骤107;若第二判断结果为否,则返回步骤102。Step 106: Determine whether all DICOM images in the DICOM image file have been selected, and obtain a second judgment result; if the second judgment result is yes, execute step 107; if the second judgment result is no, return to step 102.
步骤107:生成DICOMDIR文件。Step 107: Generate DICOMDIR file.
具体的,specific,
本发明提出的一种含有图标图像的DICOMDIR文件生成方法,包括:The invention proposes a method for generating DICOMDIR files containing icon images, including:
(1)逐个打开需要生成DICOMDIR文件的指定文件夹内的DICOM图像文件,读取DICOM图像文件中的(0028,0004)(Photometric Interpretation,光度解释)标签值,得到该DICOM图像的光度解释度信息,根据光度解释度信息判定生成的图标图是灰度图还是256色的彩色图。读取DICOM图像文件头信息中的(0028,0011)(Columns,列)标签中的值,得到DICOM图像的宽度,读取DICOM图像文件头信息中的(0028,0010)(Rows,行)标签中的值,得到DICOM图像的高度,得到该DICOM图像的宽度和高度比值,生成图标图像时图标图像的宽高比需要和该DICOM图像保持一致。(1) Open the DICOM image files in the specified folder where the DICOMDIR file needs to be generated one by one, read the (0028, 0004) (Photometric Interpretation) tag value in the DICOM image file, and obtain the photometric interpretation information of the DICOM image. , determine whether the generated icon image is a grayscale image or a 256-color color image based on the photometric interpretation information. Read the value in the (0028, 0011) (Columns, columns) tag in the DICOM image file header information to obtain the width of the DICOM image, and read the (0028, 0010) (Rows, rows) tag in the DICOM image file header information. value in, get the height of the DICOM image, and get the width and height ratio of the DICOM image. When generating the icon image, the aspect ratio of the icon image needs to be consistent with the DICOM image.
(2)如果(1)中得到的该DICOM图像的光度解释度信息是'MONOCHROME1'或是'MONOCHROME2',表示DICOM图像是灰度图,需要生成灰度图像的图标图像。读取DICOM图像文件中的第一帧图像到内存,并按照宽度和高度比值生成灰度图标图像数据并保存到内存。(2) If the photometric interpretation information of the DICOM image obtained in (1) is 'MONOCHROME1' or 'MONOCHROME2', it means that the DICOM image is a grayscale image, and an icon image of the grayscale image needs to be generated. Read the first frame image in the DICOM image file into the memory, and generate grayscale icon image data according to the width and height ratio and save it to the memory.
如果(1)中得到的该DICOM图像的光度解释度信息是RGB,则表示该图像是24位真彩色图像,使用该24位真彩色图像数据生成256色的红、绿、蓝三色的调色板数据。If the photometric interpretation information of the DICOM image obtained in (1) is RGB, it means that the image is a 24-bit true color image, and the 24-bit true color image data is used to generate 256 colors of red, green, and blue tones. Swatch data.
其中,24位真彩色图转换为256色的彩色图,常用的算法有流行色算法、中位切分算法、八叉树颜色量化算法等,其中如图2所示,八叉树颜色量化算法算法基本思路是:将图像中使用的RGB颜色值分布到层状的八叉树中。八叉树的深度可达9层,即根节点层加上分别表示8位的R、G、B值的每一位的8层节点。较低的节点层对应于较不重要的RGB值的位(右边的位)。叶节点编码存储像素的个数和R、G、B颜色分量的值;而中间的节点组成了从最顶层到叶节点的路径。这是一种高效的存储方式,既可以存储图像中出现的颜色和其出现的次数,也不会浪费内存来存储图像中不出现的颜色,八叉树颜色量化算法效率高,效果好。Among them, the 24-bit true color image is converted into a 256-color color image. Commonly used algorithms include the popular color algorithm, the median segmentation algorithm, the octree color quantization algorithm, etc. As shown in Figure 2, the octree color quantization algorithm The basic idea of the algorithm is to distribute the RGB color values used in the image into a layered octree. The depth of the octree can reach 9 levels, that is, the root node level plus 8 levels of nodes representing each bit of the 8-bit R, G, and B values. Lower node layers correspond to the bits of the less important RGB values (bits to the right). The leaf node encodes the number of pixels and the values of the R, G, and B color components; the middle nodes form the path from the top layer to the leaf node. This is an efficient storage method that can store the colors that appear in the image and the number of times they appear, and does not waste memory to store colors that do not appear in the image. The octree color quantization algorithm is highly efficient and effective.
为了生成高质量的图标图像,采用八叉树颜色量化算法实现24位真彩色图转换为256色的彩色图后得到256色的红、绿、蓝三色的调色板数据,并按照一定尺寸大小生成图标图像数据并保存到内存。In order to generate high-quality icon images, the octree color quantization algorithm is used to convert the 24-bit true color image into a 256-color color image to obtain 256-color red, green, and blue palette data, and according to a certain size Size generated icon image data and saved to memory.
如果(1)中得到的该DICOM图像的光度解释度信息是YBR_FULL、YBR_FULL_422,DICOM图像是JPEG压缩的彩色图像。读取图标图像对应的DICOM图像文件的第一帧的彩色图像数据到内存后转换为24位真彩色图像,也采用八叉树颜色量化算法实现24位真彩色图转换为256色的彩色图后得到256色的红、绿、蓝三色的调色板数据,并按照一定尺寸大小生成图标图像数据并保存到内存。If the photometric interpretation information of the DICOM image obtained in (1) is YBR_FULL, YBR_FULL_422, the DICOM image is a JPEG compressed color image. Read the color image data of the first frame of the DICOM image file corresponding to the icon image into the memory and convert it into a 24-bit true color image. The octree color quantization algorithm is also used to convert the 24-bit true color image into a 256-color color image. Obtain 256-color palette data of red, green, and blue, and generate icon image data according to a certain size and save it to memory.
如果(1)中得到的该DICOM图像的光度解释度信息PALETTE COLOR,DICOM图像是带有调色板的彩色图像。读取图标图像对应的DICOM图像文件的头中的(0028,1201)RedPalette Color Lookup Table Data(红色调色板颜色查找表数据)、(0028,1202)GreenPalette Color Lookup Table Data(绿色调色板颜色查找表数据)、(0028,1203)BluePalette Color Lookup Table Data(蓝色调色板颜色查找表数据)标签,得到调色板红、绿、蓝三色的调色板数据后。读取图标图像对应的DICOM图像文件的第一帧图像并按照一定尺寸大小生成图标图像数据并保存到内存。If the photometric interpretation information PALETTE COLOR of the DICOM image obtained in (1) is obtained, the DICOM image is a color image with a palette. Read the (0028,1201)RedPalette Color Lookup Table Data (red palette color lookup table data) and (0028,1202)GreenPalette Color Lookup Table Data (green palette color) in the header of the DICOM image file corresponding to the icon image. Lookup table data), (0028,1203) BluePalette Color Lookup Table Data (blue palette color lookup table data) tag, after obtaining the palette data of the red, green and blue colors of the palette. Read the first frame of the DICOM image file corresponding to the icon image and generate the icon image data according to a certain size and save it to the memory.
(3)指定DICOM图像文件夹中的DICOM图像全部处理完毕后,使用DICOMDIR创建函数生成DICOMDIR文件,在创建的DICOMDIR文件头部插入图标图像序列(0088,0200)标签后,在图标图像序列(0088,0200)标签内写入图标图像的光度解释度(0028,0004)标签,如果图标图像是灰度图像,在(0028,0004)标签内写入MONOCHROME2,如果图标图像是256彩色图像,在(0028,0004)标签内写入PALETTE COLOR,同时写入(0028,1201)、(0028,1202)、(0028,1203)三个标签并分别在这三个标签内写入(2)中得到的红、绿、蓝三色的调色板数据。在图标图像序列(0088,0200)标签内写入图像宽度标签(0028,0011)并在该标签内写入图像宽度值,在图标图像序列(0088,0200)标签内写入图像高度标签(0028,0010)并在该标签内写入图像高度值。最后按照循序把(2)中得到的图标图像数据写入到(0088,0200)标签内,最后保存生成的DICOMDIR文件。(3) After all DICOM images in the specified DICOM image folder are processed, use the DICOMDIR creation function to generate a DICOMDIR file. After inserting the icon image sequence (0088,0200) tag into the header of the created DICOMDIR file, add the icon image sequence (0088 ,0200) tag, write the photometric interpretability (0028, 0004) tag of the icon image. If the icon image is a grayscale image, write MONOCHROME2 in the (0028, 0004) tag. If the icon image is a 256 color image, write it in ( Write PALETTE COLOR in the 0028,0004) tag, write (0028,1201), (0028,1202), (0028,1203) three tags at the same time and write the values obtained in (2) in these three tags respectively. Palette data for red, green, and blue colors. Write the image width tag (0028, 0011) in the icon image sequence (0088,0200) tag and write the image width value in the tag. Write the image height tag (0028) in the icon image sequence (0088,0200) tag. , 0010) and write the image height value in the tag. Finally, write the icon image data obtained in (2) into the (0088,0200) tag in sequence, and finally save the generated DICOMDIR file.
例如,For example,
DICOMDIR是一个可变长度迷你database(数据库)文件。由group(0002,xxxx)和group(0004,xxxx)为主题,描述的是一个4层的树状结构。由患者(Patient),研究(Study),序列(Series)和图像(Image)构成。DICOM CD或是DVD中保存的DICOM图像,通过DICOMDIR文件进行管理,并由DICOM图像浏览软件实现由DICOMDIR管理的DICOM图像的浏览。DICOMDIR is a variable-length mini-database file. Group(0002,xxxx) and group(0004,xxxx) are the topics, describing a 4-layer tree structure. It consists of Patient, Study, Series and Image. DICOM images saved in DICOM CD or DVD are managed through DICOMDIR files, and the DICOM image browsing software allows browsing of DICOM images managed by DICOMDIR.
(a)指定一个DICOM图像文件夹,该文件夹中有36个超音波的DICOM图像。逐个读取该DICOM图像文件夹中的DICOM中的(0028,0004)(Photometric Interpretation)标签值,得到图标图像的光度解释度为'RGB',表示图标图像为24位彩色图像,读取(0028,0011)(Columns)标签值,得到DICOM图像的行数为640,表示DICOM图像的宽度是640,读取(0028,0010)(Rows)标签值,得到DICOM图像的列数为480,表示图标图像的高度是480。计算得到该DICOM图像的宽高比是4:3。(a) Specify a DICOM image folder, which contains 36 ultrasound DICOM images. Read the (0028, 0004) (Photometric Interpretation) tag values in the DICOM in the DICOM image folder one by one, and get the photometric interpretation of the icon image as 'RGB', which means that the icon image is a 24-bit color image. Read (0028 , 0011) (Columns) tag value, the number of rows of the DICOM image is 640, indicating that the width of the DICOM image is 640, read the (0028, 0010) (Rows) tag value, and the number of columns of the DICOM image is 480, indicating the icon The height of the image is 480. The calculated aspect ratio of the DICOM image is 4:3.
(b)读取DICOM图像的第一帧到内存,使用八叉树颜色量化算法实现24位真彩色图转换为256色的彩色图后得到256色的红、绿、蓝三色的调色板数据后,设定图标图像宽度是128,根据(a)中得到的DICOM图像的宽高比,计算得到图像的高度是96。根据图标图像的宽度和高度值,使用内存中的第一帧24位真彩色图像生成256色的128X96的图标图像数据并保存到内存。(b) Read the first frame of the DICOM image into memory, use the octree color quantization algorithm to convert the 24-bit true color image into a 256-color color image, and obtain a 256-color palette of red, green, and blue. After data, set the icon image width to 128. Based on the aspect ratio of the DICOM image obtained in (a), the height of the image is calculated to be 96. According to the width and height values of the icon image, use the first frame of 24-bit true color image in the memory to generate 256-color 128X96 icon image data and save it to the memory.
(c)循环处理完36张DICOM图像后,调用DICOMDIR创建函数,生成DICOMDIR文件。依据DICOM标准,在DICOMDIR文件的头部插入图标图像序列(0088,0200)标签,因为DICOM图像是彩色图像,图标图像是256色的彩色图像,在图标图像序列(0088,0200)标签中写入图标图像的光度解释度(0028,0004)标签时,(0028,0004)标签值写为PALETTECOLOR,同时写入(0028,1201)、(0028,1202)、(0028,1203)三个标签并分别在这三个标签内写入(b)中得到的红、绿、蓝三色的调色板数据。图标图像的宽度是128,在图标图像序列(0088,0200)标签中写入图标图像的宽度标签(0028,0011)时,(0028,0011)标签值是128。图标图像的高度是96,在图标图像序列(0088,0200)标签中写入图标图像的高度标签(0028,0010)时,(0028,0010)标签值是96。(c) After processing 36 DICOM images in a loop, call the DICOMDIR creation function to generate a DICOMDIR file. According to the DICOM standard, insert the icon image sequence (0088,0200) tag in the header of the DICOMDIR file. Because the DICOM image is a color image and the icon image is a 256-color color image, write the icon image sequence (0088,0200) tag in the header. When the photometric interpretation of the icon image is (0028, 0004) label, the (0028, 0004) label value is written as PALETTECOLOR, and the three labels (0028,1201), (0028,1202), (0028,1203) are written at the same time and respectively Write the red, green, and blue palette data obtained in (b) into these three tags. The width of the icon image is 128. When the width tag (0028, 0011) of the icon image is written in the icon image sequence (0088, 0200) tag, the (0028, 0011) tag value is 128. The height of the icon image is 96. When the height tag (0028, 0010) of the icon image is written in the icon image sequence (0088, 0200) tag, the (0028, 0010) tag value is 96.
最后保存生成的DICOMDIR文件。Finally save the generated DICOMDIR file.
图3为本发明实施例中含有图标图像的DICOMDIR文件生成系统结构图。如图3所示,一种含有图标图像的DICOMDIR文件生成系统,包括:Figure 3 is a structural diagram of a DICOMDIR file generation system containing icon images in an embodiment of the present invention. As shown in Figure 3, a DICOMDIR file generation system containing icon images includes:
DICOM图像文件获取模块201,用于获取DICOM图像文件;DICOM图像文件包括多个DICOM图像。The DICOM image file acquisition module 201 is used to acquire DICOM image files; DICOM image files include multiple DICOM images.
图像压缩模块202,用于选取一个DICOM图像,并对DICOM图像进行压缩处理,得到图标图像。The image compression module 202 is used to select a DICOM image and compress the DICOM image to obtain an icon image.
图像压缩模块202,具体包括:Image compression module 202 specifically includes:
预设宽度获取单元,用于获取图像图标预设宽度;The preset width acquisition unit is used to obtain the preset width of the image icon;
宽高比确定单元,用于提取DICOM图像的宽度和高度,并根据DICOM图像的宽度和高度确定宽高比;An aspect ratio determination unit is used to extract the width and height of the DICOM image, and determine the aspect ratio based on the width and height of the DICOM image;
图像图标高度计算单元,用于根据图像图标预设宽度和宽高比计算图像图标高度;The image icon height calculation unit is used to calculate the image icon height according to the preset width and aspect ratio of the image icon;
图标图像生成单元,用于根据图像图标预设宽度和图像图标高度对DICOM图像进行压缩处理,得到图标图像。The icon image generation unit is used to compress the DICOM image according to the preset width and height of the image icon to obtain an icon image.
第一判断模块203,用于判断DICOM图像为灰度图还是彩色图,得到第一判断结果;在第一判断结果为彩色图时,执行彩色图处理模块204;在第一判断结果为灰度图时,执行灰度图处理模块205。The first judgment module 203 is used to judge whether the DICOM image is a grayscale image or a color image, and obtain a first judgment result; when the first judgment result is a color image, execute the color image processing module 204; when the first judgment result is a grayscale image When the image is drawn, the grayscale image processing module 205 is executed.
第一判断模块203,具体包括:The first judgment module 203 specifically includes:
光度解释度信息提取单元,用于提取DICOM图像的光度解释度信息;Photometric interpretability information extraction unit, used to extract photometric interpretability information of DICOM images;
第一判断单元,用于根据光度解释度信息判断DICOM图像为灰度图还是彩色图;The first judgment unit is used to judge whether the DICOM image is a grayscale image or a color image based on the photometric interpretation information;
其中,in,
彩色图包括24位真彩色图像、JPEG压缩的彩色图像和带有调色板的彩色图像;Color images include 24-bit true color images, JPEG compressed color images, and color images with palettes;
当光度解释度信息为“MONOCHROME1”或“MONOCHROME2”时,DICOM图像为灰度图;When the photometric interpretation information is "MONOCHROME1" or "MONOCHROME2", the DICOM image is a grayscale image;
当光度解释度信息为“RGB”时,DICOM图像为24位真彩色图像;When the photometric interpretation information is "RGB", the DICOM image is a 24-bit true color image;
当光度解释度信息为“YBR_FULL”或“YBR_FULL_422”时,DICOM图像为JPEG压缩的彩色图像;When the photometric interpretation information is "YBR_FULL" or "YBR_FULL_422", the DICOM image is a JPEG compressed color image;
当光度解释度信息为“PALETTE COLOR”时,DICOM图像为带有调色板的彩色图像。When the photometric interpretation information is "PALETTE COLOR", the DICOM image is a color image with a palette.
彩色图处理模块204,用于提取DICOM图像的三种颜色的调色板数据;将DICOM图像对应的图标图像、图标图像的高度和宽度以及与图标图像对应的调色板数据保存在DICOMDIR文件中;其中,三种颜色分别为红、绿和蓝;图标图像保存在图标图像序列标签中。The color image processing module 204 is used to extract the palette data of three colors of the DICOM image; save the icon image corresponding to the DICOM image, the height and width of the icon image, and the palette data corresponding to the icon image in the DICOMDIR file ; Among them, the three colors are red, green and blue respectively; the icon image is saved in the icon image sequence tag.
彩色图处理模块204,具体包括:The color image processing module 204 specifically includes:
第一调色板数据生成单元,用于在彩色图为24位真彩色图像时,采用八叉树颜色量化方法将24位真彩色图像转换为256色彩色图,得到第一彩色图,然后提取第一彩色图的三种颜色的调色板数据;The first palette data generation unit is used to convert the 24-bit true color image into a 256-color color image using the octree color quantization method when the color image is a 24-bit true color image, to obtain the first color image, and then extract Palette data for the three colors of the first color image;
第二调色板数据生成单元,用于在彩色图为JPEG压缩的彩色图像时,将JPEG压缩的彩色图像先转换为24位真彩色图像,再采用八叉树颜色量化方法转换为256色彩色图,得到第二彩色图,然后提取第二彩色图的三种颜色的调色板数据;The second palette data generation unit is used to convert the JPEG compressed color image into a 24-bit true color image when the color image is a JPEG compressed color image, and then convert it into a 256-color image using the octree color quantization method. image, obtain the second color image, and then extract the palette data of the three colors of the second color image;
第三调色板数据生成单元,用于在彩色图为带有调色板的彩色图像,提取带有调色板的彩色图像的三种颜色的调色板数据。The third palette data generating unit is configured to extract palette data of three colors of the color image with a palette from the color image.
灰度图处理模块205,用于将DICOM图像对应的图标图像以及图标图像的高度和宽度保存在DICOMDIR文件中。The grayscale image processing module 205 is used to save the icon image corresponding to the DICOM image and the height and width of the icon image in the DICOMDIR file.
第二判断模块206,用于判断是否选取完DICOM图像文件中所有的DICOM图像,得到第二判断结果;在第二判断结果为是时,执行DICOMDIR文件生成模块207,在第二判断结果为否时,执行图像压缩模块202。The second judgment module 206 is used to judge whether all DICOM images in the DICOM image file have been selected to obtain the second judgment result; when the second judgment result is yes, the DICOMDIR file generation module 207 is executed, and when the second judgment result is no When, the image compression module 202 is executed.
DICOMDIR文件生成模块207,用于生成DICOMDIR文件。DICOMDIR file generation module 207, used to generate DICOMDIR files.
本发明提供的含有图标图像的DICOMDIR文件生成系统,还包括:The DICOMDIR file generation system containing icon images provided by the present invention also includes:
第一光度解释度信息保存模块,用于确定DICOM图像对应的图标图像的光度解释度信息为PALETTE COLOR,并将DICOM图像对应的图标图像的光度解释度信息保存在DICOMDIR文件中。The first photometric interpretation information saving module is used to determine the photometric interpretation information of the icon image corresponding to the DICOM image as PALETTE COLOR, and save the photometric interpretation information of the icon image corresponding to the DICOM image in the DICOMDIR file.
第二光度解释度信息保存模块,用于确定DICOM图像对应的图标图像的光度解释度信息为MONOCHROME2,并将DICOM图像对应的图标图像的光度解释度信息保存在DICOMDIR文件中。The second photometric interpretability information saving module is used to determine the photometric interpretability information of the icon image corresponding to the DICOM image as MONOCHROME2, and save the photometric interpretability information of the icon image corresponding to the DICOM image in the DICOMDIR file.
对于实施例公开的系统而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。As for the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple. For relevant details, please refer to the description in the method section.
本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处。综上,本说明书内容不应理解为对本发明的限制。This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method and the core idea of the present invention; at the same time, for those of ordinary skill in the art, according to the present invention There will be changes in the specific implementation methods and application scope of the ideas. In summary, the contents of this description should not be construed as limitations of the present invention.
Claims (10)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010942421.1A CN112071403B (en) | 2020-09-09 | 2020-09-09 | Method and system for generating DICOMDIR files containing icon images |
PCT/CN2021/116679 WO2022052884A1 (en) | 2020-09-09 | 2021-09-06 | Method and system for generating dicomdir file containing icon image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010942421.1A CN112071403B (en) | 2020-09-09 | 2020-09-09 | Method and system for generating DICOMDIR files containing icon images |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112071403A CN112071403A (en) | 2020-12-11 |
CN112071403B true CN112071403B (en) | 2023-09-12 |
Family
ID=73664541
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010942421.1A Active CN112071403B (en) | 2020-09-09 | 2020-09-09 | Method and system for generating DICOMDIR files containing icon images |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112071403B (en) |
WO (1) | WO2022052884A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112071403B (en) * | 2020-09-09 | 2023-09-12 | 周兴祥 | Method and system for generating DICOMDIR files containing icon images |
CN114566263A (en) * | 2022-04-24 | 2022-05-31 | 杭州太美星程医药科技有限公司 | Marking method, device and system for medical examination image sequence and computer equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015008650A1 (en) * | 2013-07-16 | 2015-01-22 | 株式会社 日立メディコ | Medical-image management device, and medical-image management method |
CN105631212A (en) * | 2015-12-28 | 2016-06-01 | 宁波市科技园区明天医网科技有限公司 | PNG format bearing method for DICOM image original data |
CN107122613A (en) * | 2017-05-04 | 2017-09-01 | 济南大学 | A kind of DICOM image display methods based on pseudo-colours |
CN111243712A (en) * | 2019-12-16 | 2020-06-05 | 创业慧康科技股份有限公司 | File processing method and device |
CN111613305A (en) * | 2020-05-27 | 2020-09-01 | 周兴祥 | Method and system for generating DICOMDIR file |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090103789A1 (en) * | 2007-10-23 | 2009-04-23 | Proscan Imaging, Llc | Delivering and receiving medical images |
CN104077588A (en) * | 2014-07-10 | 2014-10-01 | 苏州皓琪信息科技有限公司 | Method for automatically interposing frame offsets into medical DICOM dynamic images compressed by JPEG |
CN112071403B (en) * | 2020-09-09 | 2023-09-12 | 周兴祥 | Method and system for generating DICOMDIR files containing icon images |
-
2020
- 2020-09-09 CN CN202010942421.1A patent/CN112071403B/en active Active
-
2021
- 2021-09-06 WO PCT/CN2021/116679 patent/WO2022052884A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015008650A1 (en) * | 2013-07-16 | 2015-01-22 | 株式会社 日立メディコ | Medical-image management device, and medical-image management method |
CN105631212A (en) * | 2015-12-28 | 2016-06-01 | 宁波市科技园区明天医网科技有限公司 | PNG format bearing method for DICOM image original data |
CN107122613A (en) * | 2017-05-04 | 2017-09-01 | 济南大学 | A kind of DICOM image display methods based on pseudo-colours |
CN111243712A (en) * | 2019-12-16 | 2020-06-05 | 创业慧康科技股份有限公司 | File processing method and device |
CN111613305A (en) * | 2020-05-27 | 2020-09-01 | 周兴祥 | Method and system for generating DICOMDIR file |
Also Published As
Publication number | Publication date |
---|---|
CN112071403A (en) | 2020-12-11 |
WO2022052884A1 (en) | 2022-03-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20120250990A1 (en) | Method, apparatus and computer program product for displaying normalized medical images | |
CN112071403B (en) | Method and system for generating DICOMDIR files containing icon images | |
US8417043B2 (en) | Method, apparatus and computer program product for normalizing and processing medical images | |
WO2020238515A1 (en) | Image matching method and apparatus, device, medium, and program product | |
US11042958B2 (en) | Method and system for storing and retrieving wide-area motion imagery frames as objects on an object storage device | |
US20050190994A1 (en) | Image processing apparatus and program storage medium | |
US11412217B2 (en) | Compression of a collection of images using pattern separation and re-organization | |
CN109003269A (en) | A kind of mark extracting method for the medical image lesion that can improve doctor's efficiency | |
CN112102929A (en) | Medical image labeling method and device, storage medium and electronic equipment | |
CN110288524A (en) | Deep learning super-resolution method based on enhanced up-sampling and discrimination syncretizing mechanism | |
CN112151150B (en) | A thumbnail reading method and system for DICOMDIR files | |
CN109272449A (en) | Image display method and device, computer installation and readable storage medium storing program for executing | |
US8731319B2 (en) | Image layer stack interface | |
MXPA04010520A (en) | Systems and methods for indexing and retrieving images. | |
JP2001157146A (en) | Image information processor | |
CN116781922A (en) | Dynamic image compression method, system, equipment and storage medium | |
CN103034972B (en) | The method that realizes of image processing platform and image processing platform | |
US20060227348A1 (en) | Information processing method and apparatus | |
CN110119380A (en) | A kind of storage, read method and the device of Scalable Vector map file | |
CN104615739B (en) | The quick archiving method of data suitable for three-dimensional brain tissue high-resolution magnanimity atlas | |
KR102505994B1 (en) | Lightweight 3d volume data acquisition system and method | |
TWI825633B (en) | Image processing method, image processing apparatus, and image processing system | |
Park et al. | Historical Asset Viewer for Efficient Management of Cultural Heritage | |
JPH11175548A (en) | Method for retrieving image file and device therefor and storage medium | |
CN117951728A (en) | A method for batch desensitization and format conversion of echocardiogram DICOM files |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20210903 Address after: College of mechanical engineering, No. 17, Qinghua East Road, East Campus of China Agricultural University, Haidian District, Beijing 100089 Applicant after: Zhou Xingxiang Address before: 215500 No.9, Sihai Road, Changshu Economic and Technological Development Zone, Suzhou City, Jiangsu Province Applicant before: Suzhou Xiaoyi Wulian Technology Co.,Ltd. |
|
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20231226 Address after: China Agricultural University (East District), 17 Qinghua East Road, Haidian District, Beijing 100083 Patentee after: CHINA AGRICULTURAL University Address before: College of mechanical engineering, No. 17, Qinghua East Road, East Campus of China Agricultural University, Haidian District, Beijing 100089 Patentee before: Zhou Xingxiang |