FUNCTION REFERENCE

dicominfo

Read bounded metadata from a DICOM Part 10 file.

Read bounded metadata from a DICOM Part 10 file.

Syntax

info = dicominfo(filename); info = dicominfo(filename,'Dictionary',dictionaryFile)

Returns Filename, FileSize, Format ('DICOM'), available image dimensions and known public metadata. BitDepth uses BitsStored, falling back to BitsAllocated. Missing tags stay absent. Sequences are structs with Item_1, Item_2, ...; PN names have FamilyName, GivenName, MiddleName, NamePrefix and NameSuffix (optional Ideographic/Phonetic component structs). Numeric VRs retain their signed/unsigned integer or floating class and multiplicity as column vectors; DS/IS become double. Ordinary text removes right SPACE padding; UI removes right NUL padding. ASCII (default/ISO_IR 6) and ISO_IR 192 UTF-8 are supported, including inherited item character sets.

Differences from MATLAB: this bounded metadata slice supports Part 10 implicit VR little endian, explicit VR little endian, explicit VR big endian, Deflated Explicit VR Little Endian (1.2.840.10008.1.2.1.99), RLE Lossless (1.2.840.10008.1.2.5), JPEG Baseline Process 1 (1.2.840.10008.1.2.4.50) and JPEG Lossless Process 14 / Selection Value 1 (1.2.840.10008.1.2.4.57 / .70). Raw datasets, other transfer syntax UIDs, other character sets and options other than Dictionary error explicitly. dicominfo does not decode pixels; dicomread supports native grayscale/RGB and multiple frames. dicomwrite supports a bounded native grayscale, RGB and multiframe writer; dicomdict controls this Engine session; the app is not supported yet. The generated PS3.6 2026d public dictionary includes standard and retired data, file-meta and directory tags, including repeating tags; factory private tags and command elements are excluded. A custom text dictionary (dicomdict set or the Dictionary option) replaces naming and VRs for implicit and explicit files and may name private tags; tags it omits are skipped like unknown tags, except that SpecificCharacterSet is always read and counted against the metadata budget. Present known metadata fields use PS3.6 keywords; base overlay and curve fields use names such as OverlayRows_0 and CurveDimensions_0. Other base repeaters keep their keyword, and non-base repeaters append the wildcard value in uppercase hexadecimal. Explicit VR must belong to the dictionary VR set (UN remains skipped). Implicit US/SS pixel-related values use the nearest enclosing PixelRepresentation. For LUTDescriptor and the red, green and blue palette descriptors with VR SS, only the second value is signed; the first and third are unsigned, and dicominfo returns these mixed descriptors as int32 arrays. PixelData remains OW, and other ambiguous entries use the first listed VR. Unknown defined-length primitive tags are checked and skipped in this result; unknown implicit undefined-length values are unsupported. Native PixelData, FloatPixelData and DoubleFloatPixelData are skipped by checked file offsets; RLE and JPEG encapsulated PixelData items (Basic Offset Table, fragments, delimiter) are structurally checked by their lengths without reading fragment bytes; safely bounded metadata after pixels is inspected. Deflated files require inflating the entire dataset, including pixel bytes, even for dicominfo; this costs decoded-dataset memory and work, rather than metadata-only memory. Filename and FileSize describe the physical file and TransferSyntaxUID remains the original .99 UID. dicominfo and dicomread require regular files and reject FIFOs before opening them. Files are limited to 256 MiB; metadata uses a conservative 16 MiB budget capped by available engine memory, values to 1 MiB, structural nodes to 10000, sequence items to 1024 and parser nesting to 32. The existing engine struct depth/size limits additionally apply to the returned value. No writes are performed.

Example

exist('dicominfo','builtin')   % 5

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.