// blog
DICOM Multi-frame Files and Frame Time: How Clips Play
A multi-frame DICOM file stores several images in one Pixel Data element; Number of Frames (0028,0008) says how many. Frame Increment Pointer (0028,0009) names the tag that gives the timing, usually Frame Time (0018,1063), the milliseconds between frames, or Frame Time Vector (0018,1065) for uneven timing. Cine Rate (0018,0040) and Recommended Display Frame Rate (0008,2144) give frames per second. Our ultrasound sample has 38 frames at a Frame Time of 111.1 ms, about 9 per second.

A CT is a stack of files, one per slice. An ultrasound loop is usually the opposite: one file, many frames. Play it in our viewer and it runs at the speed it was recorded. Here’s where that speed comes from.
Our ultrasound sample
(0028,0008) IS [38] NumberOfFrames
(0028,0009) AT (0018,1063) FrameIncrementPointer
(0018,1063) DS [111.09528] FrameTime
(0018,0040) IS [9] CineRate
(0008,2144) IS [9] RecommendedDisplayFrameRate
(0028,0004) CS [YBR_FULL] PhotometricInterpretation
38 frames in one file, 111.1 ms apart: about 9 frames per second, which the Cine Rate confirms.
The tags that matter
- Number of Frames (0028,0008): how many images are in the Pixel Data.
- Frame Increment Pointer (0028,0009): a tag pointing at another tag, the one that says how frames are spaced. Usually Frame Time.
- Frame Time (0018,1063): milliseconds between frames, when they’re evenly spaced.
- Frame Time Vector (0018,1065): one value per frame, when they aren’t.
- Cine Rate (0018,0040) and Recommended Display Frame Rate (0008,2144): frames per second to play at.
Our viewer uses Cine Rate when it’s there, and 1000 / Frame Time otherwise.
Finding the frames
For uncompressed pixels, the frames sit one after another:
const frameBytes = rows * columns * samplesPerPixel * (bitsAllocated / 8);
const frame = pixelData.subarray(n * frameBytes, (n + 1) * frameBytes);
For compressed (encapsulated) pixels, each frame is stored as one or more fragments. The basic offset table at the start can tell you where each frame begins; when it’s empty, you walk the fragments. Check every offset against the file’s length before you use it; our tests with hostile files show what happens otherwise.
Playing smoothly
- Decode ahead. Decode the frames once, then draw from memory.
- Use the frame rate, not the screen’s. A requestAnimationFrame loop runs at 60 Hz or more; advance a frame only when its time has passed.
- Keep one window for the whole loop. If each frame suggests a slightly different window, applying each one makes the clip flicker. We use the first frame’s.
Enhanced multi-frame
Newer CT and MR objects put a whole series in one file. Per-frame details (position, rescale, timing) live in the Per-frame Functional Groups Sequence (5200,9230), shared ones in the Shared Functional Groups Sequence (5200,9229). A viewer has to look there instead of in the top-level tags.
Key takeaways
- (0028,0008) Number of Frames; (0028,0009) points to the timing tag.
- Frame Time (0018,1063) in ms, or Cine Rate (0018,0040) in frames per second.
- Uncompressed frames are back to back; compressed ones need the offset table or fragment walk.
- Play at the file’s rate, with one window for the whole clip.
We’re glad to share what we know. When you want a viewer or portal of your own, we’ll put all of it to work on your project, and because we build with AI-assisted development, it costs far less than you might expect. Let’s talk.
Frequently asked questions
How do I find frame N in the pixel data?
Uncompressed: frame N starts at N × rows × columns × samples per pixel × bytes per sample. Compressed (encapsulated): each frame is in its own fragments, found through the basic offset table or by walking the fragments.
What's an enhanced multi-frame file?
The newer CT, MR and other image types that put a whole series in one file, with per-frame details (position, timing, rescale) in the Per-frame Functional Groups Sequence (5200,9230) and shared ones in (5200,9229).
Is a series of single-frame files worse than one multi-frame file?
Neither is wrong. Classic CT and MR use one file per slice; ultrasound, angiography and enhanced objects use multi-frame. A viewer should handle both.
































































































































