如何在PyDICOM中获取超声DICOM图像的像素/cm²缩放比例
DICOM超声图像缩放信息(像素/cm²)提取问题
我有多个存储超声图像的DICOM文件,需要提取图像的缩放信息(即像素/cm²)。请问是否存在对应的DICOM标签存储该信息?还是需要通过计算得出?
我的DICOM数据集如下:
Dataset.file_meta ------------------------------- (0002, 0000) File Meta Information Group Length UL: 196 (0002, 0001) File Meta Information Version OB: b'\x00\x01' (0002, 0002) Media Storage SOP Class UID UI: Ultrasound Multi-frame Image Storage (0002, 0003) Media Storage SOP Instance UID UI: 1.2.840.113619.2.391.51208.1686298501.4.21 (0002, 0010) Transfer Syntax UID UI: JPEG Baseline (Process 1) (0002, 0012) Implementation Class UID UI: 1.2.276.0.48.20000.2 (0002, 0013) Implementation Version Name SH: 'TomTecArena v2' (0002, 0016) Source Application Entity Title AE: 'TTCLIENT' ------------------------------------------------- (0008, 0008) Image Type CS: ['DERIVED', 'PRIMARY', '', '0001'] (0008, 0016) SOP Class UID UI: Ultrasound Multi-frame Image Storage (0008, 0018) SOP Instance UID UI: 1.2.840.113619.2.391.51208.1686298501.4.21 (0008, 0020) Study Date DA: '20230609' (0008, 0021) Series Date DA: '20230609' (0008, 0023) Content Date DA: '20230609' (0008, 002a) Acquisition DateTime DT: '20230609081459' (0008, 0030) Study Time TM: '081459' (0008, 0031) Series Time TM: '081459' (0008, 0033) Content Time TM: '081459' (0008, 0050) Accession Number SH: '' (0008, 0060) Modality CS: 'US' (0008, 0070) Manufacturer LO: 'GE Vingmed Ultrasound' (0008, 0090) Referring Physician's Name PN: '' (0008, 1090) Manufacturer's Model Name LO: 'Vivid E95' (0008, 2142) Start Trim IS: '1' (0008, 2143) Stop Trim IS: '32' (0008, 2144) Recommended Display Frame Rate IS: '30' (0010, 0010) Patient's Name PN: '3001' (0010, 0020) Patient ID LO: '3001' (0010, 0030) Patient's Birth Date DA: '' (0010, 0040) Patient's Sex CS: '' (0012, 0062) Patient Identity Removed CS: 'YES' (0012, 0063) De-identification Method LO: 'GEVU anonymization' (0018, 0040) Cine Rate IS: '30' (0018, 0072) Effective Duration DS: '1.04' (0018, 1020) Software Versions LO: 'Vivid E95:201.84.0' (0018, 1063) Frame Time DS: '33.5484' (0018, 1066) Frame Delay DS: '0.0' (0018, 1088) Heart Rate IS: '95' (0018, 1242) Actual Frame Duration IS: '33' (0018, 1244) Preferred Playback Sequencing US: 0 (0018, 6011) Sequence of Ultrasound Regions 1 item(s) ---- (0018, 6012) Region Spatial Format US: 1 (0018, 6014) Region Data Type US: 1 (0018, 6016) Region Flags UL: 0 (0018, 6018) Region Location Min X0 UL: 213 (0018, 601a) Region Location Min Y0 UL: 70 (0018, 601c) Region Location Max X1 UL: 803 (0018, 601e) Region Location Max Y1 UL: 658 (0018, 6020) Reference Pixel X0 SL: 295 (0018, 6022) Reference Pixel Y0 SL: 0 (0018, 6024) Physical Units X Direction US: 3 (0018, 6026) Physical Units Y Direction US: 3 (0018, 602c) Physical Delta X FD: 0.0238278 (0018, 602e) Physical Delta Y FD: 0.0238278 (0018, 6030) Transducer Frequency UL: 1670 --------- (0018, 6060) R Wave Time Vector FL: [313.3869934082031, 1000.0260009765625] (0020, 000d) Study Instance UID UI: 1.2.840.113619.2.391.51208.1686298500.4.1 (0020, 000e) Series Instance UID UI: 1.2.840.113619.2.391.51208.1686298500.4.2 (0020, 0010) Study ID SH: '202306090814' (0020, 0011) Series Number IS: '1' (0020, 0013) Instance Number IS: '19' (0020, 0020) Patient Orientation CS: '' (0028, 0002) Samples per Pixel US: 3 (0028, 0004) Photometric Interpretation CS: 'YBR_FULL_422' (0028, 0006) Planar Configuration US: 0 (0028, 0008) Number of Frames IS: '32' (0028, 0009) Frame Increment Pointer AT: (0018, 1063) (0028, 0010) Rows US: 708 (0028, 0011) Columns US: 1016 (0028, 0014) Ultrasound Color Data Present US: 0 (0028, 0100) Bits Allocated US: 8 (0028, 0101) Bits Stored US: 8 (0028, 0102) High Bit US: 7 (0028, 0103) Pixel Representation US: 0 (0028, 2110) Lossy Image Compression CS: '01' (0028, 2112) Lossy Image Compression Ratio DS: '95.0' (7fe0, 0010) Pixel Data OB: Array of 2521450 elements (fffc, fffc) Data Set Trailing Padding OB: b'\x00\x00'
解答
没有直接存储像素/cm²的DICOM标签,需要通过现有标签计算得出,步骤如下:
- 确认物理单位:查看
(0018, 6024)和(0018, 6026)标签(Physical Units X/Y Direction),值为3,对应毫米(mm)(DICOM标准中US类型值3代表毫米)。 - 获取像素物理长度:在
(0018, 6011)(Sequence of Ultrasound Regions)序列下,(0018, 602c)(Physical Delta X)和(0018, 602e)(Physical Delta Y)的值均为0.0238278,即每个像素对应0.0238278毫米。 - 计算缩放信息:
- 单位转换:将毫米转为厘米,
0.0238278 mm = 0.00238278 cm - 每厘米像素数:
1 ÷ 0.00238278 ≈ 420 像素/cm - 像素/cm²:
(420)² ≈ 176400 像素/cm²
- 单位转换:将毫米转为厘米,
内容的提问来源于stack exchange,提问作者mik.ro
相关产品推荐
相关产品推荐

