DICOM Parser Accessing Hexadecimal Values

3 次查看(过去 30 天)
Hello,
I am working with a DICOM file for which I am interested in finding the values contained on (0066,0016) - "PointCoordinatesData"
While using rubomedical DICOM Parser I am able to view the full values I am interested in.
On MATLAB, I tried using the dicomdisp function but it does not show the values. All it says is "Binary"
Even if it displayed the values after dicomdisp, How can I manipulate the values from dicomdisp?

回答(1 个)

Gayathri
Gayathri 2025-6-10
To view the values in a specific tag, which are not visible when using the "dicomdisp" function, we can make use of the "dicominfo" function. Please look into the code below which illustrates the same.
dicomdisp("CT-MONO2-16-ankle.dcm")
File: /MATLAB/toolbox/images/imdata/CT-MONO2-16-ankle.dcm (525436 bytes) Read on an IEEE little-endian machine. File begins with group 0002 metadata at byte 132. Transfer syntax: 1.2.840.10008.1.2 (Implicit VR Little Endian). DICOM Information object: 1.2.840.10008.5.1.4.1.1.7 (Secondary Capture Image Storage). Location Level Tag VR Size Name Data ---------------------------------------------------------------------------------------------------- 0000132 0 (0002,0000) UL 4 bytes - FileMetaInformationGroupLength *Binary* 0000144 0 (0002,0001) OB 2 bytes - FileMetaInformationVersion *Binary* 0000158 0 (0002,0002) UI 26 bytes - MediaStorageSOPClassUID [1.2.840.10008.5.1.4.1.1.7 ] 0000192 0 (0002,0003) UI 50 bytes - MediaStorageSOPInstanceUID [1.2.840.113619.2.1.2411.1031152382.365.1.736169244] 0000250 0 (0002,0010) UI 18 bytes - TransferSyntaxUID [1.2.840.10008.1.2 ] 0000276 0 (0002,0012) UI 18 bytes - ImplementationClassUID [1.2.840.113619.6.5] 0000302 0 (0002,0013) SH 6 bytes - ImplementationVersionName [1_2_5 ] 0000316 0 (0002,0016) AE 12 bytes - SourceApplicationEntityTitle [CTN_STORAGE ] 0000336 0 (0008,0000) UL 4 bytes - IdentifyingGroupLength *Binary* 0000348 0 (0008,0008) CS 20 bytes - ImageType [DERIVED\SECONDARY\3D] 0000376 0 (0008,0016) UI 26 bytes - SOPClassUID [1.2.840.10008.5.1.4.1.1.7 ] 0000410 0 (0008,0018) UI 50 bytes - SOPInstanceUID [1.2.840.113619.2.1.2411.1031152382.365.1.736169244] 0000468 0 (0008,0020) DA 10 bytes - StudyDate [1993.04.30] 0000486 0 (0008,0021) DA 10 bytes - SeriesDate [1993.04.30] 0000504 0 (0008,0023) DA 10 bytes - ContentDate [1993.04.30] 0000522 0 (0008,0030) TM 8 bytes - StudyTime [11:27:24] 0000538 0 (0008,0031) TM 8 bytes - SeriesTime [11:27:24] 0000554 0 (0008,0033) TM 8 bytes - ContentTime [11:27:24] 0000570 0 (0008,0060) CS 2 bytes - Modality [CT] 0000580 0 (0008,0064) CS 4 bytes - ConversionType [WSD ] 0000592 0 (0008,0070) LO 18 bytes - Manufacturer [GE MEDICAL SYSTEMS] 0000618 0 (0008,0080) LO 18 bytes - InstitutionName [JFK IMAGING CENTER] 0000644 0 (0008,0090) PN 10 bytes - ReferringPhysicianName [Anonymized] 0000662 0 (0008,1010) SH 8 bytes - StationName [CT01OC0 ] 0000678 0 (0008,1030) LO 8 bytes - StudyDescription [RT ANKLE] 0000694 0 (0008,1060) PN 10 bytes - NameOfPhysiciansReadingStudy [Anonymized] 0000712 0 (0008,1070) PN 10 bytes - OperatorsName [Anonymized] 0000730 0 (0008,1090) LO 12 bytes - ManufacturerModelName [GENESIS_ZEUS] 0000750 0 (0010,0000) UL 4 bytes - PatientGroupLength *Binary* 0000762 0 (0010,0010) PN 10 bytes - PatientName [Anonymized] 0000780 0 (0018,0000) UL 4 bytes - AcquisitionGroupLength *Binary* 0000792 0 (0018,1020) LO 2 bytes - SoftwareVersions [03] 0000802 0 (0020,0000) UL 4 bytes - RelationshipGroupLength *Binary* 0000814 0 (0020,000D) UI 48 bytes - StudyInstanceUID [1.2.840.113619.2.1.1.322987881.621.736170080.681] 0000870 0 (0020,000E) UI 48 bytes - SeriesInstanceUID [1.2.840.113619.2.1.2411.1031152382.365.736169244] 0000926 0 (0020,0011) IS 4 bytes - SeriesNumber [365 ] 0000938 0 (0020,0013) IS 2 bytes - InstanceNumber [1 ] 0000948 0 (0028,0000) UL 4 bytes - ImagePresentationGroupLength *Binary* 0000960 0 (0028,0002) US 2 bytes - SamplesPerPixel *Binary* 0000970 0 (0028,0004) CS 12 bytes - PhotometricInterpretation [MONOCHROME2 ] 0000990 0 (0028,0010) US 2 bytes - Rows *Binary* 0001000 0 (0028,0011) US 2 bytes - Columns *Binary* 0001010 0 (0028,0100) US 2 bytes - BitsAllocated *Binary* 0001020 0 (0028,0101) US 2 bytes - BitsStored *Binary* 0001030 0 (0028,0102) US 2 bytes - HighBit *Binary* 0001040 0 (0028,0103) US 2 bytes - PixelRepresentation *Binary* 0001050 0 (0028,0106) US 2 bytes - SmallestImagePixelValue *Binary* 0001060 0 (0028,0120) US 2 bytes - PixelPaddingValue *Binary* 0001070 0 (0028,1050) DS 4 bytes - WindowCenter [1024] 0001082 0 (0028,1051) DS 4 bytes - WindowWidth [4095] 0001094 0 (0028,1052) DS 6 bytes - RescaleIntercept [-1024 ] 0001108 0 (0028,1053) DS 2 bytes - RescaleSlope [1 ] 0001118 0 (0028,1054) LO 2 bytes - RescaleType [US] 0001128 0 (7FE0,0000) UL 4 bytes - PixelDataGroupLength *Binary* 0001140 0 (7FE0,0010) OB 524288 bytes - PixelData []
Here, in the above code output we can see that for the tag (0002,0000) FileMetaInformationGroupLength, under the "Data" sections shows as Binary. Now if we use the "dicominfo" function to get the file information.
info=dicominfo("CT-MONO2-16-ankle.dcm")
info = struct with fields:
Filename: '/MATLAB/toolbox/images/imdata/CT-MONO2-16-ankle.dcm' FileModDate: '18-Dec-2000 17: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
Here we can see that the "info" has several properties and "FileMetaInformationGroupLength" is one of them. So now using this "info" we can access and manipulate the required property as required.
info.FileMetaInformationGroupLength
ans = uint32 192
info.FileMetaInformationGroupLength=191
info = struct with fields:
Filename: '/MATLAB/toolbox/images/imdata/CT-MONO2-16-ankle.dcm' FileModDate: '18-Dec-2000 17:06:43' FileSize: 525436 Format: 'DICOM' FormatVersion: 3 Width: 512 Height: 512 BitDepth: 16 ColorType: 'grayscale' FileMetaInformationGroupLength: 191 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
For more information on "dicominfo" function, refer to the following documentation link.

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by