Read metadata from DICOM message
provides additional options to the parser using info
= dicominfo(___,Name,Value
)Name,Value
pairs. You can specify multiple name-value pairs.
Read metadata from a DICOM message.
info = dicominfo('CT-MONO2-16-ankle.dcm')
info = struct with fields:
Filename: '/mathworks/devel/bat/BR2020bd/build/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: [2x1 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: [1x1 struct]
StationName: 'CT01OC0'
StudyDescription: 'RT ANKLE'
NameOfPhysiciansReadingStudy: [1x1 struct]
OperatorsName: [1x1 struct]
ManufacturerModelName: 'GENESIS_ZEUS'
PatientGroupLength: 18
PatientName: [1x1 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
filename
— Name of DICOM fileName of DICOM file, specified as a character vector or string scalar.
Data Types: char
| string
D
— Data dictionary file'dicom-dict.mat'
| character vector | string scalarData dictionary file, specified as a character vector or string scalar.
The file in D
must be on the MATLAB® search path. The default file is
dicom-dict.mat
.
Data Types: char
| string
Specify optional
comma-separated pairs of Name,Value
arguments. Name
is
the argument name and Value
is the corresponding value.
Name
must appear inside quotes. You can specify several name and value
pair arguments in any order as
Name1,Value1,...,NameN,ValueN
.
dicominfo('CT-MONO2-16-ankle.dcm','UseVRHeuristic',false)
'UseVRHeuristic'
— Read noncompliant DICOM files that switch VR modes incorrectlytrue
(default) | false
Read noncompliant DICOM files that switch value representation (VR)
modes incorrectly, specified as the comma-separated pair consisting of
'UseVRHeuristic'
and true
or
false
.
When set to true
(the default),
dicomread
uses a heuristic to help read certain
noncompliant DICOM files that switch VR modes incorrectly.
dicomread
displays a warning if the heuristic is
used. A small number of compliant files will not be read correctly. Set
UseVRHeuristic
to false
to
read these compliant files.
Data Types: logical
'UseDictionaryVR'
— Conform data types to data dictionaryfalse
(default) | true
Conform data types in info
to the data
dictionary, regardless of what information is present in the file. The
default value is false
, which uses the file's VR
codes even if they differ from the data dictionary. Most of the time it
is unnecessary to set this field, since file contents and the data
dictionary almost always agree. When
UseDictionaryVR
is false
(the default), dicominfo
issues a warning when they
do not agree. Specify UseDictionaryVR
as
true
when the warning is issued and providing
info
to dicomwrite
causes
errors.
Data Types: logical
info
— DICOM metadataDICOM metadata, returned as a struct.
dicomanon
| dicomdict
| dicomdisp
| dicomlookup
| dicomread
| dicomuid
| dicomwrite
You have a modified version of this example. Do you want to open this example with your edits?