CN112151150A - Thumbnail reading method and system for DICOMDIR file - Google Patents
Thumbnail reading method and system for DICOMDIR file Download PDFInfo
- Publication number
- CN112151150A CN112151150A CN202011029089.6A CN202011029089A CN112151150A CN 112151150 A CN112151150 A CN 112151150A CN 202011029089 A CN202011029089 A CN 202011029089A CN 112151150 A CN112151150 A CN 112151150A
- Authority
- CN
- China
- Prior art keywords
- image
- color
- icon
- parameter
- file
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 22
- 238000013139 quantization Methods 0.000 claims description 12
- 230000011218 segmentation Effects 0.000 claims description 6
- 239000003086 colorant Substances 0.000 description 14
- 238000010586 diagram Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 238000005481 NMR spectroscopy Methods 0.000 description 1
- 238000003745 diagnosis Methods 0.000 description 1
- 229940079593 drug Drugs 0.000 description 1
- 239000003814 drug Substances 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000001172 regenerating effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/50—Information retrieval; Database structures therefor; File system structures therefor of still image data
- G06F16/54—Browsing; Visualisation therefor
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
The invention relates to a thumbnail reading method and a thumbnail reading system for DICOMDIR files. The method comprises the following steps: acquiring a DICOMDIR file; judging whether the DICOMDIR file has an icon image sequence label, if so, reading a first label value of each icon image, and acquiring a DICOM image file corresponding to each icon image; reading a second tag value in the head information of the DICOM image file; adjusting the first image parameters based on the second image parameters, determining a thumbnail of the icon image, and displaying the thumbnail in a thumbnail image display window of browsing software for previewing; and if not, reading a DICOM image file in the DICOMDIR file, and generating an icon image according to the DICOM image file. The invention can improve the generation efficiency of the preview thumbnail and the working efficiency of medical staff.
Description
Technical Field
The invention relates to the field of medical image processing, in particular to a thumbnail reading method and a thumbnail reading system for DICOMDIR files.
Background
In hospitals, Digital Imaging and Communications in Medicine (DICOM) generated by CT, nuclear magnetic resonance, angiographic diagnostic apparatuses, ultrasonic diagnostic apparatuses, and the like can be stored as DICOM images on portable CD or DVD media, and then transferred to other third-party medical institutions when patients are stored or transferred, thereby realizing the film-free management of the DICOM images.
The DICOM images stored on CD or DVD are usually managed by Digital Imaging and communication files (DICOMDIR) in the medical Directory, and can be browsed by the image browsing software.
When DICOM images in a CD or DVD are browsed using DICOM image browsing software, first, a thumbnail Image (ICON) showing all the DICOM images is previewed in an image display window of the browsing software, and detailed observation and diagnosis are performed after one or a plurality of DICOM images are selected for enlarged representation.
When the DICOM image browsing software realizes the preview of the DICOM image thumbnail, the DICOM image browsing software generally searches and searches the name of each DICOM file from the DICOMDIR file quickly, opens and reads each DICOM image file to generate the thumbnail image, and then displays the thumbnail image in an image display window of the browsing software. When the number of images in a CD or DVD is large, it takes a long time to generate a thumbnail image, and it may take 20 seconds or more to generate and display a thumbnail image of all DICOM images in one CD or DVD, which may result in inefficient preview of images by medical staff.
Currently, DICOMDIR files for CDs or DVDs generated by Image diagnostic equipment or DICOM Image generation apparatuses from many manufacturers include DICOM Image thumbnails (Icon Image Sequence: 0088, 0200). In order to quickly read and represent the thumbnail images to preview the DICOM images, the DICOM image browsing software directly reads the icon image sequences (0088,0200) existing in the DICOMDIR files instead of reading the DICOM image data to regenerate the thumbnail images, so that the quick preview of all DICOM images managed by the DICOMDIR files is realized.
The sequence of thumbnail images (0088,0200) in the DICOMDIR file is a data set consisting of icon images that must not be larger than 128 rows by 128 columns, and only monochrome or palette color images can be used. However, the aspect ratio of the icon images in the icon image sequence (0088,0200) in the DICOMDIR file in some CD or DVD is not consistent with the aspect ratio of the DICOM images managed in DICOMDIR; still other icons in the sequence of icon images (0088,0200) in the DICOMDIR file in a CD or DVD are monochrome in color, and DICOM images managed in DICOMDIR are color in color. In this case, when the icon image sequence (0088,0200) is read for quick preview, the aspect ratio or color of the preview thumbnail icon and the actual DICOM image may not be consistent. Therefore, when reading the icon image sequence (0088,0200) in the DICOMDIR file for quick preview, the problem of consistency between the icon image and the actual DICOM image must be solved.
Disclosure of Invention
The invention aims to provide a method and a system for reading a DICOMDIR file thumbnail, which are used for solving the problems that in the traditional method for reading the DICOMDIR file thumbnail, an icon image is inconsistent with an actual DICOM image, so that the generation speed of a preview thumbnail is low, and the quick preview of all DICOM images managed by the DICOMDIR file cannot be realized.
In order to achieve the purpose, the invention provides the following scheme:
a thumbnail reading method of DICOMDIR files comprises the following steps:
acquiring a DICOMDIR file; the DICOMDIR file comprises a plurality of icon images;
judging whether the DICOMDIR file has an icon image sequence label or not to obtain a first judgment result;
if the first judgment result shows that the DICOMDIR file has an icon image sequence label, reading a first label value of each icon image, and acquiring a DICOM image file corresponding to each icon image; the first label value is used for determining a first image parameter of the icon image; the first image parameters comprise the width, the height and the image color category of the icon image;
reading a second tag value in the head information of the DICOM image file; the second label value is used for determining a second image parameter of a DICOM image in the DICOM image file; the second image parameters comprise the width, the height and the image color category of a DICOM image in the DICOM image file;
adjusting the first image parameters based on the second image parameters, determining a thumbnail of the icon image, and displaying the thumbnail in a thumbnail image display window of browsing software for previewing;
and if the first judgment result shows that the DICOMDIR file does not have the icon image sequence label, reading the DICOM image file in the DICOMDIR file, and generating an icon image according to the DICOM image file.
Optionally, the adjusting the first image parameter based on the second image parameter, determining the thumbnail of the icon image, and displaying the thumbnail in a thumbnail image display window of the browsing software for previewing specifically includes:
judging whether the first image parameter is consistent with the second image parameter to obtain a second judgment result;
if the second judgment result shows that the first image parameters are consistent with the second image parameters, the thumbnails of the icon images are read to a memory one by one and are displayed in a thumbnail image display window of the browsing software for previewing;
if the second judgment result shows that the first image parameter is inconsistent with the second image parameter, adjusting the first image parameter to enable the first image parameter to be consistent with the second image parameter.
Optionally, the adjusting the first image parameter to make the first image parameter consistent with the second image parameter specifically includes:
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, adjusting the aspect ratio of the icon image to make the first image parameter consistent with the second image parameter; the aspect ratio is the ratio of width to height;
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 the image color category in the first image parameter is inconsistent with the image color category in the second image parameter, generating a color palette, and adjusting the image color category of the icon image according to the color palette so that the first image parameter is consistent with the second image parameter; the aspect ratio is the ratio of width to height;
if the second judgment result shows that the first image parameter is inconsistent with the second image parameter, generating a color palette to adjust the color category of the icon image while adjusting the aspect ratio of the icon image, so that the first image parameter is consistent with the second image parameter; aspect ratio is the ratio of width to height.
Optionally, the generating a color palette, and adjusting the image color category of the icon image according to the color palette specifically includes:
converting the 24-bit true color image into a 256-color image by using a popular color algorithm, a median segmentation algorithm and an octree color quantization algorithm, and determining a 256-color palette; the 256-tone color plate is a color palette;
acquiring a 24-bit true color image of the icon image;
and adjusting the 24-bit true color map according to the color palette to adjust the image color category of the icon image.
A thumbnail reading system for DICOMDIR files, comprising:
a DICOMDIR file obtaining module for obtaining the DICOMDIR file; the DICOMDIR file comprises a plurality of icon images;
the first judgment module is used for judging whether the DICOMDIR file has an icon image sequence label or not to obtain a first judgment result;
a first tag value reading module, configured to read a first tag value of each icon image and obtain a DICOM image file corresponding to each icon image if the first determination result indicates that an icon image sequence tag exists in the DICOM dir file; the first label value is used for determining a first image parameter of the icon image; the first image parameters comprise the width, the height and the image color category of the icon image;
the second tag value reading module is used for reading a second tag value in the head information of the DICOM image file; the second label value is used for determining a second image parameter of a DICOM image in the DICOM image file; the second image parameters comprise the width, the height and the image color category of a DICOM image in the DICOM image file;
the adjusting module is used for adjusting the first image parameters based on the second image parameters, determining the thumbnail of the icon image, and displaying the thumbnail in a thumbnail image display window of browsing software for previewing;
and the icon image generation module is used for reading the DICOM image file in the DICOMDIR file and generating an icon image according to the DICOM image file if the first judgment result shows that the DICOMDIR file does not have the icon image sequence label.
Optionally, the adjusting module specifically includes:
the second judgment submodule is used for judging whether the first image parameter is consistent with the second image parameter to obtain a second judgment result;
the preview module submodule is used for reading the thumbnails of the icon images one by one to the memory and representing the thumbnails to a thumbnail image representation window of the browsing software for previewing if the second judgment result shows that the first image parameter is consistent with the second image parameter;
and an adjusting submodule, configured to adjust the first image parameter if the second determination result indicates that the first image parameter is inconsistent with the second image parameter, so that the first image parameter is consistent with the second image parameter.
Optionally, the adjusting sub-module specifically includes:
an aspect ratio adjusting unit, configured to adjust an aspect ratio of the icon image so that the first image parameter is consistent with the second image parameter if the second determination 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; the aspect ratio is the ratio of width to height;
an image color type adjusting unit, configured to generate a color palette if the second determination 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 type in the first image parameter is inconsistent with the image color type in the second image parameter, and adjust the image color type of the icon image according to the color palette so that the first image parameter is consistent with the second image parameter; the aspect ratio is the ratio of width to height;
an aspect ratio and image color category adjusting unit, configured to generate a color palette to adjust the color category of the icon image while adjusting the aspect ratio of the icon image if the second determination result indicates that the first image parameter is inconsistent with the second image parameter, so that the first image parameter is consistent with the second image parameter; aspect ratio is the ratio of width to height.
Optionally, the image color category adjusting unit specifically includes:
the 256-color palette determining subunit is used for converting the 24-bit true color image into a 256-color image by utilizing a popular color algorithm, a median segmentation algorithm and an octree color quantization algorithm and determining the 256-color palette; the 256-tone color plate is a color palette;
a 24-bit true color image obtaining subunit, configured to obtain a 24-bit true color image of the icon image;
and the image color category adjusting subunit is used for adjusting the 24-bit true color image according to the color palette so as to adjust the image color category of the icon image.
According to the specific embodiment provided by the invention, the invention discloses the following technical effects: the invention provides a method and a system for reading a thumbnail of a DICOMDIR file, which are used for directly reading an icon image sequence existing in the DICOMDIR file when browsing the DICOMDIR file in a CD or a DVD, adjusting a first image parameter by comparing a first image parameter of an icon image in the icon image sequence with a second image parameter of a DICOM image in the DICOM image file based on a comparison result, determining a thumbnail of the icon image after the icon image is consistent with the parameters of the DICOM image, and displaying the thumbnail in a thumbnail image display window of browsing software for previewing, thereby improving the generation efficiency of a preview thumbnail, realizing the rapid preview of all DICOM images managed by the DICOMDIR file, and improving the working efficiency of medical staff.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a flow chart of a thumbnail reading method for DICOMDIR files provided by the present invention;
FIG. 2 is a block diagram of the sequence of icons (0088,0200) provided by the present invention;
FIG. 3 is a schematic diagram of an octree color quantization algorithm provided by the present invention to generate a 256-color palette;
fig. 4 is a diagram of a thumbnail reading system for DICOMDIR files according to the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention aims to provide a flow chart of a thumbnail reading method of a DICOMDIR file, which realizes the consistent rapid preview of an icon image and an actual DICOM image when an icon image sequence (0088,0200) in the DICOMDIR file is read.
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
Fig. 1 is a flowchart of a thumbnail reading method for a DICOMDIR file provided by the present invention, and as shown in fig. 1, a thumbnail reading method for a DICOMDIR file includes:
step 101: acquiring a DICOMDIR file; the DICOMDIR file includes a plurality of icon images.
Opening a DICOMDIR file in a CD or DVD, and detecting whether an Icon Image Sequence (0088,0200) label exists in the DICOMDIR file. The (0088,0200) icon image sequence structure is shown in figure 2.
Step 102: and judging whether the DICOMDIR file has an icon image sequence label, if so, executing step 103, and if not, executing step 106.
Step 103: reading a first label value of each icon image, and acquiring a DICOM image file corresponding to each icon image; the first label value is used for determining a first image parameter of the icon image; the first image parameters include a width, a height, and an image color class of the icon image.
If the (0088,0200) label exists, reading a first label value of the (0028, 0004) (photomeric Interpretation) label from the label of the icon image sequence (0088,0200), obtaining the luminosity Interpretation information of the icon image, and judging whether the icon image is a gray scale image or a 256-color image according to the luminosity Interpretation information. There are two types of color categories of icon images in the icon image sequence (0088,0200) label, which are monochrome gray scale images or 256 color images. If the luminosity interpretation information of the icon image is 'MONOCHROME1' or 'MONOCHROME2', it means that the icon image is a gray scale image; if the photometric explanatory degree information of the icon image is PALETTECOLOR, it means that the icon image is a color image of 256 colors.
Reading a first label value in a (0028, 0011) (Columns) label to obtain the width of the icon image, then reading a value in a (0028, 0010) (Rows) label to obtain the height of the icon image, and obtaining the aspect ratio of the icon image by using the ratio of the width to the height of the icon image.
Step 104: reading a second tag value in the head information of the DICOM image file; the second label value is used for determining a second image parameter of a DICOM image in the DICOM image file; the second image parameters comprise the width, height and image color category of the DICOM image in the DICOM image file.
Searching a DICOM image file corresponding to the icon image from the DICOMDIR file, opening and reading a second label value of a (0028, 0004) label in the DICOM image file header information to obtain the luminosity interpretation degree information of the DICOM image, and judging whether the DICOM image is a gray scale image or a color image according to the luminosity interpretation degree information.
If the luminosity interpretation degree information of the DICOM image is MONOCHROME1 or MONOCHROME2, it indicates that the DICOM image is a MONOCHROME gray scale image, and if the luminosity interpretation degree information of the DICOM image is RGB, YBR _ FULL _422, it indicates that the DICOM image is a color image. If the luminosity interpretability information of the DICOM image is PALETTECOLOR, the DICOM image is a color palette image.
Reading a second label value in a (0028, 0011) label in the DICOM image file header information to obtain the width of the DICOM image, reading a value in a (0028, 0010) label in the DICOM image file header information to obtain the height of the DICOM image, and obtaining the aspect ratio of the DICOM image by using the ratio of the width to the height of the DICOM image.
Step 105: and adjusting the first image parameters based on the second image parameters, determining the thumbnail of the icon image, and displaying the thumbnail in a thumbnail image display window of the browsing software for previewing.
And if the aspect ratio of the first icon image is consistent with that of the image of the first DICOM image file corresponding to the icon image and the color information is also consistent, reading the icon images in the icon image sequence (0088,0200) labels one by one into a memory and displaying the icon images in a thumbnail image display window of browsing software for quick preview.
If the aspect ratio of the first icon image and the DICOM image file corresponding to the icon is not consistent but the colors are consistent, reading the icon images in the labels of the icon image sequence (0088,0200) one by one into a memory, and regenerating the icon image for the icon image in the memory according to the reference aspect ratio by using the aspect ratio value of the DICOM image obtained in the step (2) as the reference aspect ratio and representing the icon image into a thumbnail image representation window of browsing software.
If the aspect ratio of the icon image is consistent with that of the DICOM image file corresponding to the icon but the color information is inconsistent, the icon image is a monochrome gray scale image, and the DICOM image file is a color image, the 24-bit true color image data of the first DICOM image file corresponding to the icon image is read into the memory one by one, if the first DICOM image file corresponding to the icon image is a DICOM animation 24-bit true color image, the 24-bit true color image data of the first frame of the animation image is stored into the memory, then the 24-bit true color image data is used for generating 256-color palette data, and the palette is used for changing the monochrome icon image into a 256-color image and representing the image in a thumbnail image representation window of browsing software.
The 24-bit true color map is converted into a 256-color map, and commonly used algorithms include a popular color algorithm, a median segmentation algorithm, an octree color quantization algorithm and the like, wherein as shown in fig. 3, the basic idea of the octree color quantization algorithm is as follows: the RGB color values used in the image are distributed into a layered octree. The octree may be up to 9 levels deep, i.e., the root node level plus 8 levels of nodes representing each bit of the 8-bit R, G, B value, respectively. The lower level of nodes corresponds to the bits of the RGB values that are less important (the bits on the right). Leaf node encoding the number of storage pixels and R, G, B values of color components; while the intermediate nodes constitute the path from the topmost level to the leaf nodes. The method is an efficient storage mode, can store the colors appearing in the image and the appearance times of the colors, does not waste a memory to store the colors which do not appear in the image, and has high efficiency and good effect.
In order to quickly represent icon images in the DICOMDIR file and realize quick reading, an octree color quantization algorithm is adopted to convert a 24-bit true color image into a 256-color image and obtain a 256-color palette. This palette is used to change a monochrome icon image to a 256-color image and to represent it in a thumbnail image representation window of browsing software.
If the luminance interpretation information of the DICOM image is YBR _ FULL, YBR _ FULL _422, the DICOM image is a JPEG-compressed color image. Reading color image data of a first frame of a DICOM image file corresponding to the icon image into a memory, converting the color image data into a 24-bit true color image, and converting the 24-bit true color image into a 256-color image by using an octree color quantization algorithm to obtain a 256-color palette. This palette is used to change a monochrome icon image to a 256-color image and to represent it in a thumbnail image representation window of browsing software.
If the DICOM image has photometric interpretation information PALETTE COLOR, the DICOM image is a COLOR image with a COLOR PALETTE. Reading a label (0028, 1201) in a head of the DICOM image file corresponding to the icon image: red palette color look-up Table Data RedPalette ColorLookup Table Data, (0028, 1202) tag: green palette Color look-up Table Data GreenPalette Color Lookup Table Data, (0028, 1203) label: the Data of the Blue Palette color lookup Table Data Blue Palette lookup Table Data is obtained, and the Palette of 256 colors is generated after the Data of the three colors of red, green and Blue is obtained. This palette is used to change a single-color icon image to a 256-color icon image and to represent it in a thumbnail image representation window of browsing software.
If the aspect ratio of the icon image is inconsistent with that of the DICOM image file corresponding to the icon and the color information is inconsistent, namely the icon image is a monochrome gray image, the image in the DICOM image file is in a color image mode, after the icon image in the icon image sequence (0088,0200) label is read into the memory, the icon image is changed into a color image by using a 256-color palette, and the aspect ratio of the icon image is changed by using the aspect ratio of the DICOM image and then is displayed in a thumbnail image display window of the browsing software.
Step 106: and if the first judgment result shows that the DICOMDIR file does not have the icon image sequence label, reading the DICOM image file in the DICOMDIR file, and generating an icon image according to the DICOM image file.
If no (0088,0200) label exists in the DICOMDIR file, searching all DICOM image files from the DICOMDIR file, opening the DICOM image files one by one, reading (0028, 0004) label values in a DICOM file header to obtain the luminosity interpretation degree information of the DICOM image, reading (0028, 0011) label values in the DICOM file header to obtain the width of the image, reading (0028, 0010) label values in the DICOM file header to obtain the height of the image, and calculating the width-height ratio of the DICOM image according to the width and height values of the image.
If the luminosity interpretation degree information is MONOCHROME1 or MONOCHROME2, the image is a MONOCHROME gray image, the first frame image in each DICOM image file is read into a memory, a MONOCHROME icon image is generated according to a certain size and then displayed in a thumbnail image preview display window of browsing software.
If the luminosity interpretation degree information of the DICOM image is RGB, the image is a 24-bit true color image, the first frame color image in each DICOM image file is read into the memory, a 256-color palette is generated by adopting the method in the step (5),
and generating a 256-color icon image by using the palette according to a certain size, and then displaying the image in a thumbnail image preview display window of browsing software.
If the luminance interpretation information of the DICOM image is YBR _ FULL, YBR _ FULL _422, the DICOM image is a JPEG-compressed color image. Reading color image data of a first frame of a DICOM image file corresponding to the icon image, converting the color image data into a 24-bit true color image, adopting a 256-color palette, generating a 256-color icon image according to a certain size by using the palette, and displaying the image in a thumbnail image preview display window of browsing software.
If the DICOM image has photometric interpretability information PALETTECOLOR, the DICOM image is a color image with a color palette. Reading image data of a first frame of a DICOM image file corresponding to the icon image into a memory, generating a 256-color icon image by adopting a 256-color palette according to a certain size, and displaying the 256-color icon image in a thumbnail image preview display window of browsing software.
In practical applications, the DICOMDIR is a variable-length mini database file. With group (0002, xxxx) and group (0004, xxxx) as topics, a 4-level tree structure is described. The Patient (Patient), Study (Study), Series (Series) and Image (Image) were included. DICOM images stored in DICOM CD or DVD are managed by DICOMDIR files, and DICOM image browsing software realizes the quick browsing of DICOM images managed by DICOMDIR.
(1) A640 million CD is opened, a DICOMDIR file exists under the CD root directory, and the DICOMDIR file manages 16 DICOM image files.
Opening a DICOMDIR file under the root directory of the CD, reading and searching icon image (0088,0200) tags, and finding the icon image (0088,0200) tags in the DICOMDIR.
Reading (0028, 0004) (Photometric Interpretation) label values from (0088,0200) icon sequence labels to obtain a luminosity Interpretation of the icon image of 'MONOCHROME2', indicating that the icon image is a MONOCHROME gray-scale image, reading (0028, 0011) (Columns) label values to obtain the number of Rows of the icon image of 128, indicating that the width of the icon image is 128, reading (0028, 0010) (Rows) label values to obtain the number of Columns of the icon image of 96, and indicating that the height of the icon image is 96.
A label (0004, 1500) is read from the opened DICOMDIR file to obtain a DICOM image file with a path D \ \ DCM0001, after the DICOM image file is opened, a label value (0008, 0060) (modular) is read to obtain diagnostic device information of 'US', indicating that the image is an ultrasonic image, a label value (0028, 0004) is read to obtain a photometric interpretation of an icon image of 'RGB', a label value (0028, 0008) (numberroframes) is read to obtain an image with a frame number of 80 frames, a 24-bit color animation image indicating that the image is 80 frames, a label value (0028, 0011) is read to obtain a line number of the icon image of 640, a width of the icon image of 640, a label value (0028, 0010) is read to obtain a line number of the icon image of 480, and a height of the icon image of 480.
(2) The aspect ratio of the icon image obtained in (1) is 96/128-3/4, and the aspect ratio of the actual DICOM image is 640/480-3/4, which are the same. The icon image obtained in (1) is a monochrome gray image, the actual DICOM image is a 24-bit true color image, and in order to maintain consistency with the actual DICOM image in the case of fast preview representation of the icon image, a 256-color palette of the actual DICOM image is calculated, and the icon image is changed to a 256-color icon image using the palette.
The octree color quantization algorithm has the characteristics of high efficiency and good effect, and the octree color quantization algorithm is used for converting 24-bit true color into 256 colors.
Firstly, an octree is established, and octree nodes are characterized in that each node has 8 word nodes at most and are numbered 0-7. Reading 24-bit true color image data in the DICOM image file obtained in the step (1) to a memory, establishing an octree according to RGB values of pixels of the image, firstly establishing a Root node (Root), then respectively forming a value of 0-7 according to each bit of the RGB values of the pixels of the image, and sequentially inserting the value into the tree. Taking pixel RGB (123, 54, 78) as an example, the values of the first layer to the eighth layer are 0, 5, 6, 5, 3, 7, 4, respectively. By analogy, the RGB values of all pixels are inserted into the octree layer by layer, and the total of the RGB values of all passing nodes and the number of RGB colors are recorded on each node. During the insertion, if the node does not exist, a new node needs to be created, and then the node count and the sum of the RGB components are increased. After inserting a color, if the number of leaf nodes exceeds the number of colors to be obtained (256 colors need to be obtained 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. Since the lower the level of nodes, the less sensitive the data, we will merge from the lowest level of nodes. And according to a priority merging strategy with a small node count value, all RGB components and node counts of the word node are recorded into the node, and all child nodes are deleted. And the operation is carried out until the number of the combined leaves meets the requirement.
Secondly, after all colors are inserted according to the steps, an octree with leaf nodes not exceeding 256 is established. At this time, the average value (sum of components/count of nodes) of the RGB components in the leaf node is taken out, that is, the obtained palette color value is obtained, and the extraction of the palette is completed.
(3) Reading icon images from the (0088,0200) label sequence obtained in the step (1) to a memory one by one, changing the gray icon images into 256 color images by using the 256-color palette obtained in the step (2), displaying the images in a thumbnail image display window of browsing software, and performing loop processing until all 16 images are processed. In the example, icon thumbnails of 16 DICOM images are displayed within 1 second, so that the thumbnail icons can be quickly previewed when the DICOM DIR is browsed.
Fig. 4 is a structure diagram of a thumbnail reading system of a DICOMDIR file provided by the present invention, and as shown in fig. 4, a thumbnail reading system of a DICOMDIR file is characterized by comprising:
a DICOMDIR file acquiring module 401 configured to acquire a DICOMDIR file; the DICOMDIR file includes a plurality of icon images.
A first determining module 402, configured to determine whether an icon image sequence tag exists in the DICOMDIR file, so as to obtain a first determination result.
A first tag value reading module 403, configured to read a first tag value of each icon image and obtain a DICOM image file corresponding to each icon image if the first determination result indicates that an icon image sequence tag exists in the DICOM dir file; the first label value is used for determining a first image parameter of the icon image; the first image parameters include a width, a height, and an image color class of the icon image.
A second tag value reading module 404, configured to read a second tag value in header information of the DICOM image file; the second label value is used for determining a second image parameter of a DICOM image in the DICOM image file; the second image parameters comprise the width, height and image color category of the DICOM image in the DICOM image file.
And an adjusting module 405, configured to adjust the first image parameter based on the second image parameter, determine a thumbnail of the icon image, and display the thumbnail in a thumbnail image display window of the browsing software for previewing.
The adjusting module 405 specifically includes: the second judgment submodule is used for judging whether the first image parameter is consistent with the second image parameter to obtain a second judgment result; the preview module submodule is used for reading the thumbnails of the icon images one by one to the memory and representing the thumbnails to a thumbnail image representation window of the browsing software for previewing if the second judgment result shows that the first image parameter is consistent with the second image parameter; and an adjusting submodule, configured to adjust the first image parameter if the second determination result indicates that the first image parameter is inconsistent with the second image parameter, so that the first image parameter is consistent with the second image parameter.
The adjusting submodule specifically includes: an aspect ratio adjusting unit, configured to adjust an aspect ratio of the icon image so that the first image parameter is consistent with the second image parameter if the second determination 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; aspect ratio is the ratio of width to height.
An image color type adjusting unit, configured to generate a color palette if the second determination 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 type in the first image parameter is inconsistent with the image color type in the second image parameter, and adjust the image color type of the icon image according to the color palette so that the first image parameter is consistent with the second image parameter; aspect ratio is the ratio of width to height.
The image color category adjusting unit specifically includes: the 256-color palette determining subunit is used for converting the 24-bit true color image into a 256-color image by utilizing a popular color algorithm, a median segmentation algorithm and an octree color quantization algorithm and determining the 256-color palette; the 256-tone color plate is a color palette; a 24-bit true color image obtaining subunit, configured to obtain a 24-bit true color image of the icon image; and the image color category adjusting subunit is used for adjusting the 24-bit true color image according to the color palette so as to adjust the image color category of the icon image.
An aspect ratio and image color category adjusting unit, configured to generate a color palette to adjust the color category of the icon image while adjusting the aspect ratio of the icon image if the second determination result indicates that the first image parameter is inconsistent with the second image parameter, so that the first image parameter is consistent with the second image parameter; aspect ratio is the ratio of width to height.
And an icon image generating module 406, configured to, if the first determination result indicates that the DICOM dir file does not have an icon image sequence tag, read the DICOM image file in the DICOM dir file, and generate an icon image according to the DICOM image file.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
The principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In view of the above, the present disclosure should not be construed as limiting the invention.
Claims (8)
1. A thumbnail reading method of DICOMDIR files is characterized by comprising the following steps:
acquiring a DICOMDIR file; the DICOMDIR file comprises a plurality of icon images;
judging whether the DICOMDIR file has an icon image sequence label or not to obtain a first judgment result;
if the first judgment result shows that the DICOMDIR file has an icon image sequence label, reading a first label value of each icon image, and acquiring a DICOM image file corresponding to each icon image; the first label value is used for determining a first image parameter of the icon image; the first image parameters comprise the width, the height and the image color category of the icon image;
reading a second tag value in the head information of the DICOM image file; the second label value is used for determining a second image parameter of a DICOM image in the DICOM image file; the second image parameters comprise the width, the height and the image color category of a DICOM image in the DICOM image file;
adjusting the first image parameters based on the second image parameters, determining a thumbnail of the icon image, and displaying the thumbnail in a thumbnail image display window of browsing software for previewing;
and if the first judgment result shows that the DICOMDIR file does not have the icon image sequence label, reading the DICOM image file in the DICOMDIR file, and generating an icon image according to the DICOM image file.
2. The method of claim 1, wherein the adjusting the first image parameter based on the second image parameter, determining the thumbnail of the icon image, and displaying the thumbnail to a thumbnail image display window of a browsing software for previewing comprises:
judging whether the first image parameter is consistent with the second image parameter to obtain a second judgment result;
if the second judgment result shows that the first image parameters are consistent with the second image parameters, the thumbnails of the icon images are read to a memory one by one and are displayed in a thumbnail image display window of the browsing software for previewing;
if the second judgment result shows that the first image parameter is inconsistent with the second image parameter, adjusting the first image parameter to enable the first image parameter to be consistent with the second image parameter.
3. The method of claim 2, wherein the adjusting the first image parameter such that the first image parameter is consistent with the second image parameter comprises:
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, adjusting the aspect ratio of the icon image to make the first image parameter consistent with the second image parameter; the aspect ratio is the ratio of width to height;
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 the image color category in the first image parameter is inconsistent with the image color category in the second image parameter, generating a color palette, and adjusting the image color category of the icon image according to the color palette so that the first image parameter is consistent with the second image parameter; the aspect ratio is the ratio of width to height;
if the second judgment result shows that the first image parameter is inconsistent with the second image parameter, generating a color palette to adjust the color category of the icon image while adjusting the aspect ratio of the icon image, so that the first image parameter is consistent with the second image parameter; aspect ratio is the ratio of width to height.
4. The method of claim 3, wherein the generating a color palette and adjusting the image color category of the icon image according to the color palette comprises:
converting the 24-bit true color image into a 256-color image by using a popular color algorithm, a median segmentation algorithm and an octree color quantization algorithm, and determining a 256-color palette; the 256-tone color plate is a color palette;
acquiring a 24-bit true color image of the icon image;
and adjusting the 24-bit true color map according to the color palette to adjust the image color category of the icon image.
5. A thumbnail reading system for DICOMDIR files, comprising:
a DICOMDIR file obtaining module for obtaining the DICOMDIR file; the DICOMDIR file comprises a plurality of icon images;
the first judgment module is used for judging whether the DICOMDIR file has an icon image sequence label or not to obtain a first judgment result;
a first tag value reading module, configured to read a first tag value of each icon image and obtain a DICOM image file corresponding to each icon image if the first determination result indicates that an icon image sequence tag exists in the DICOM dir file; the first label value is used for determining a first image parameter of the icon image; the first image parameters comprise the width, the height and the image color category of the icon image;
the second tag value reading module is used for reading a second tag value in the head information of the DICOM image file; the second label value is used for determining a second image parameter of a DICOM image in the DICOM image file; the second image parameters comprise the width, the height and the image color category of a DICOM image in the DICOM image file;
the adjusting module is used for adjusting the first image parameters based on the second image parameters, determining the thumbnail of the icon image, and displaying the thumbnail in a thumbnail image display window of browsing software for previewing;
and the icon image generation module is used for reading the DICOM image file in the DICOMDIR file and generating an icon image according to the DICOM image file if the first judgment result shows that the DICOMDIR file does not have the icon image sequence label.
6. The system of claim 5, wherein the adjustment module comprises:
the second judgment submodule is used for judging whether the first image parameter is consistent with the second image parameter to obtain a second judgment result;
the preview module submodule is used for reading the thumbnails of the icon images one by one to the memory and representing the thumbnails to a thumbnail image representation window of the browsing software for previewing if the second judgment result shows that the first image parameter is consistent with the second image parameter;
and an adjusting submodule, configured to adjust the first image parameter if the second determination result indicates that the first image parameter is inconsistent with the second image parameter, so that the first image parameter is consistent with the second image parameter.
7. The system of claim 6, wherein the adjustment submodule specifically comprises:
an aspect ratio adjusting unit, configured to adjust an aspect ratio of the icon image so that the first image parameter is consistent with the second image parameter if the second determination 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; the aspect ratio is the ratio of width to height;
an image color type adjusting unit, configured to generate a color palette if the second determination 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 type in the first image parameter is inconsistent with the image color type in the second image parameter, and adjust the image color type of the icon image according to the color palette so that the first image parameter is consistent with the second image parameter; the aspect ratio is the ratio of width to height;
an aspect ratio and image color category adjusting unit, configured to generate a color palette to adjust the color category of the icon image while adjusting the aspect ratio of the icon image if the second determination result indicates that the first image parameter is inconsistent with the second image parameter, so that the first image parameter is consistent with the second image parameter; aspect ratio is the ratio of width to height.
8. The system of claim 7, wherein the image color class adjustment unit comprises:
the 256-color palette determining subunit is used for converting the 24-bit true color image into a 256-color image by utilizing a popular color algorithm, a median segmentation algorithm and an octree color quantization algorithm and determining the 256-color palette; the 256-tone color plate is a color palette;
a 24-bit true color image obtaining subunit, configured to obtain a 24-bit true color image of the icon image;
and the image color category adjusting subunit is used for adjusting the 24-bit true color image according to the color palette so as to adjust the image color category of the icon image.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011029089.6A CN112151150B (en) | 2020-09-27 | 2020-09-27 | Thumbnail reading method and system for DICOMDIR file |
PCT/CN2021/120849 WO2022063287A1 (en) | 2020-09-27 | 2021-09-27 | Thumbnail reading method and system for dicomdir file |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011029089.6A CN112151150B (en) | 2020-09-27 | 2020-09-27 | Thumbnail reading method and system for DICOMDIR file |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112151150A true CN112151150A (en) | 2020-12-29 |
CN112151150B CN112151150B (en) | 2023-09-26 |
Family
ID=73894147
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011029089.6A Active CN112151150B (en) | 2020-09-27 | 2020-09-27 | Thumbnail reading method and system for DICOMDIR file |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN112151150B (en) |
WO (1) | WO2022063287A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022063287A1 (en) * | 2020-09-27 | 2022-03-31 | 周兴祥 | Thumbnail reading method and system for dicomdir file |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116664960A (en) * | 2023-07-28 | 2023-08-29 | 深圳弗瑞奇科技有限公司 | Cat stool identification method based on image processing |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101350923A (en) * | 2008-09-03 | 2009-01-21 | 中国科学院上海技术物理研究所 | Method for communication and indication of interactive iatrology image |
US20120131498A1 (en) * | 2010-11-24 | 2012-05-24 | General Electric Company | Systems and methods for applying series level operations and comparing images using a thumbnail navigator |
US20120320167A1 (en) * | 2011-06-15 | 2012-12-20 | Toshiba Medical Systems Corporation | Image processing system and method |
CN104012079A (en) * | 2012-01-23 | 2014-08-27 | 佳能株式会社 | Image display apparatus and control method therefor |
Family Cites Families (4)
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 (en) * | 2017-04-27 | 2017-09-08 | 广州慧扬健康科技有限公司 | DICOM medical images file reads adaption system |
CN112151150B (en) * | 2020-09-27 | 2023-09-26 | 周兴祥 | Thumbnail reading method and system for DICOMDIR file |
-
2020
- 2020-09-27 CN CN202011029089.6A patent/CN112151150B/en active Active
-
2021
- 2021-09-27 WO PCT/CN2021/120849 patent/WO2022063287A1/en active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101350923A (en) * | 2008-09-03 | 2009-01-21 | 中国科学院上海技术物理研究所 | Method for communication and indication of interactive iatrology image |
US20120131498A1 (en) * | 2010-11-24 | 2012-05-24 | General Electric Company | Systems and methods for applying series level operations and comparing images using a thumbnail navigator |
US20120320167A1 (en) * | 2011-06-15 | 2012-12-20 | Toshiba Medical Systems Corporation | Image processing system and method |
CN104012079A (en) * | 2012-01-23 | 2014-08-27 | 佳能株式会社 | Image display apparatus and control method therefor |
Non-Patent Citations (2)
Title |
---|
"基于DICOM的数字式乳腺机图像工作站设计", 中国优秀博士硕士学位论文全文数据库, no. 01 * |
杜建军;郝玮琳;刘有军;乔爱科;: "医学图像三维可视化***框架设计与开发", 北京生物医学工程, no. 06 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2022063287A1 (en) * | 2020-09-27 | 2022-03-31 | 周兴祥 | Thumbnail reading method and system for dicomdir file |
Also Published As
Publication number | Publication date |
---|---|
CN112151150B (en) | 2023-09-26 |
WO2022063287A1 (en) | 2022-03-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20050190994A1 (en) | Image processing apparatus and program storage medium | |
WO2022063287A1 (en) | Thumbnail reading method and system for dicomdir file | |
US7813557B1 (en) | Tagging detected objects | |
US7636450B1 (en) | Displaying detected objects to indicate grouping | |
US8504573B1 (en) | Management of smart tags via hierarchy | |
CN103843032B (en) | For the image procossing of high dynamic range images | |
US6492998B1 (en) | Contents-based video story browsing system | |
US7694885B1 (en) | Indicating a tag with visual data | |
CN101783886A (en) | Information processing apparatus, information processing method, and program | |
CN101523387B (en) | Data processing system, image display device and program thereof | |
US20090064048A1 (en) | Method and system for generating thumbnails for video files | |
CN112071403B (en) | DICOMDIR file generation method and system containing icon images | |
KR100862939B1 (en) | Image recording and playing system and image recording and playing method | |
Onken et al. | Digital imaging and communications in medicine | |
US10032290B2 (en) | Method for synthesizing dynamic virtual figures | |
CN111613305B (en) | DICOMDIR file generation method and system | |
CN101461228A (en) | Image processing circuit, semiconductor device, and image processing device | |
CN104112100B (en) | Data-hiding method and device based on bitmap | |
KR101534272B1 (en) | Method for managing medical image data | |
CN106791939A (en) | Movable image conversion method based on stream media technology | |
CN111724297A (en) | Image processing method and device | |
CN106612197A (en) | Network thumbnail generation method and device | |
Rahman et al. | Creation of video summary with the extracted salient frames using color moment, color histogram and speeded up robust features | |
CN1551210A (en) | Method for storing additional data relating to menu data | |
CN117474816B (en) | High dynamic range image tone mapping method, system and readable storage medium |
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 | ||
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: 100083 School of mechanical engineering, 17 Qinghua East Road, East Campus of China Agricultural University, Haidian District, Beijing Patentee before: Zhou Xingxiang |