Main Content

dicominfo

从 DICOM 消息中读取元数据

说明

示例

info = dicominfo(filename) 从符合医学数字成像和通信 (DICOM) 标准的文件或安全数字成像和通信 (DICOS) 文件 filename 中读取元数据。

info = dicominfo(filename,"dictionary",D) 使用数据字典文件 D 读取 DICOM 消息。

info = dicominfo(___,Name=Value) 支持上述语法中的任何输入参量组合,且可使用一个或多个名称-值参量指定选项。

示例

全部折叠

从 DICOM 消息中读取元数据。

info = dicominfo("CT-MONO2-16-ankle.dcm")
info = struct with fields:
                          Filename: 'B:\matlab\toolbox\images\imdata\CT-MONO2-16-ankle.dcm'
                       FileModDate: '18-Dec-2000 12:06:43'
                          FileSize: 525436
                            Format: 'DICOM'
                     FormatVersion: 3
                             Width: 512
                            Height: 512
                          BitDepth: 16
                         ColorType: 'grayscale'
    FileMetaInformationGroupLength: 192
        FileMetaInformationVersion: [2×1 uint8]
           MediaStorageSOPClassUID: '1.2.840.10008.5.1.4.1.1.7'
        MediaStorageSOPInstanceUID: '1.2.840.113619.2.1.2411.1031152382.365.1.736169244'
                 TransferSyntaxUID: '1.2.840.10008.1.2'
            ImplementationClassUID: '1.2.840.113619.6.5'
         ImplementationVersionName: '1_2_5'
      SourceApplicationEntityTitle: 'CTN_STORAGE'
            IdentifyingGroupLength: 414
                         ImageType: 'DERIVED\SECONDARY\3D'
                       SOPClassUID: '1.2.840.10008.5.1.4.1.1.7'
                    SOPInstanceUID: '1.2.840.113619.2.1.2411.1031152382.365.1.736169244'
                         StudyDate: '1993.04.30'
                        SeriesDate: '1993.04.30'
                       ContentDate: '1993.04.30'
                         StudyTime: '11:27:24'
                        SeriesTime: '11:27:24'
                       ContentTime: '11:27:24'
                          Modality: 'CT'
                    ConversionType: 'WSD'
                      Manufacturer: 'GE MEDICAL SYSTEMS'
                   InstitutionName: 'JFK IMAGING CENTER'
            ReferringPhysicianName: [1×1 struct]
                       StationName: 'CT01OC0'
                  StudyDescription: 'RT ANKLE'
      NameOfPhysiciansReadingStudy: [1×1 struct]
                     OperatorsName: [1×1 struct]
             ManufacturerModelName: 'GENESIS_ZEUS'
                PatientGroupLength: 18
                       PatientName: [1×1 struct]
            AcquisitionGroupLength: 10
                  SoftwareVersions: '03'
           RelationshipGroupLength: 134
                  StudyInstanceUID: '1.2.840.113619.2.1.1.322987881.621.736170080.681'
                 SeriesInstanceUID: '1.2.840.113619.2.1.2411.1031152382.365.736169244'
                      SeriesNumber: 365
                    InstanceNumber: 1
      ImagePresentationGroupLength: 168
                   SamplesPerPixel: 1
         PhotometricInterpretation: 'MONOCHROME2'
                              Rows: 512
                           Columns: 512
                     BitsAllocated: 16
                        BitsStored: 16
                           HighBit: 15
               PixelRepresentation: 1
           SmallestImagePixelValue: 0
                 PixelPaddingValue: 0
                      WindowCenter: 1024
                       WindowWidth: 4095
                  RescaleIntercept: -1024
                      RescaleSlope: 1
                       RescaleType: 'US'
              PixelDataGroupLength: 524296

输入参数

全部折叠

DICOM 文件的名称,指定为字符向量或字符串标量。

数据类型: char | string

数据字典文件,指定为字符向量或字符串标量。D 中的文件必须位于 MATLAB® 搜索路径中。

数据类型: char | string

名称-值参数

将可选的参量对组指定为 Name1=Value1,...,NameN=ValueN,其中 Name 是参量名称,Value 是对应的值。名称-值参量必须出现在其他参量后,但对各个参量对组的顺序没有要求。

示例: dicominfo("CT-MONO2-16-ankle.dcm",UseVRHeuristic=false) 在不使用启发式方法的条件下从 DICOM 文件中读取元数据。

如果使用的是 R2021a 之前的版本,请使用逗号分隔每个名称和值,并用引号将 Name 引起来。

示例: dicominfo("CT-MONO2-16-ankle.dcm","UseVRHeuristic",false) 在不使用启发式方法的条件下从 DICOM 文件中读取元数据。

读取那些值表示法 (VR) 模式切换不当的不符合 DICOM 标准的文件,指定为逻辑值 1 (true) 或 0 (false)。

当设置为 true 时,dicominfo 使用启发式方法来帮助读取某些 VR 模式切换不当的不符合 DICOM 标准的文件。如果使用此启发式方法,dicominfo 将显示一条警告。如果启用此启发式方法,少量符合标准的文件将无法正确读取。请将 UseVRHeuristic 设置为 false 以读取这些符合标准的文件。

数据类型: logical

使数据类型符合数据字典,指定为逻辑值 0 (false) 或 1 (true)。如果此参量指定为 true,则 info 输出结构体使用数据字典中的数据类型,而不管文件中存储的是什么信息。如果指定为 falseinfo 输出使用文件的 VR 代码,即使它们与数据字典不同也是如此。由于文件内容和数据字典几乎始终一致,因此通常没有必要将此参量指定为 true

但是,如果文件和数据字典不一致,并且 UseDictionaryVR 设置为 false(默认值),则 dicominfo 会发出警告,并且您在将 info 传递给 dicomwrite 时可能会遇到错误。要解决这些错误,请将 UseDictionaryVR 指定为 true 以使用数据字典中的 VR 代码。

数据类型: logical

输出参量

全部折叠

DICOM 元数据,以结构体形式返回。

版本历史记录

在 R2006a 之前推出

另请参阅

| | | | | | | (Medical Imaging Toolbox) | (Medical Imaging Toolbox) | (Medical Imaging Toolbox)