Larvitar Documentation
Home
Guide
API
GitHub
Home
Guide
API
GitHub
  • API

    • Initializing
    • Parsing
    • Loading
    • Rendering
    • Interacting
    • Testing
    • Modules

      • Logger
      • Store
      • Managers

        • Image Manager
        • GSPS Manager
        • File Manager
      • Parsers

        • PDF Parser
        • NRRD Parser
        • ECG Parser
      • Loaders
        • DICOM Loader
        • MultiFrame Loader
        • SingleFrame Loader
        • DSA Image Loader
        • File Loader
        • Nrrd Loader
      • Interaction Tools

        • Initialize and manage Tools
        • Default and Custom Tools
        • Segmentation Tools
        • DvTools
      • Utilities

        • DICOM Anonymization
        • DICOM Customization
        • Tags
        • Utils
        • Memory
      • Post Processing

        • DSA
      • Visualizations

        • Layers
        • ECG
        • Color Maps
        • Greyscale Presentation States
      • Testing
Larvitar

Multiframe Loader

The Multiframe Loader Module is a custom DICOM loader specifically designed to handle multiframe images. It enables efficient parsing, caching, and rendering of individual frames from multiframe datasets, seamlessly integrating with the cornerstoneDICOMImageLoader ecosystem.

Key Responsibilities

  • Loading Multiframe Images: Provides custom logic to load individual frames from multiframe DICOM datasets.
  • Caching: Implements an internal cache to optimize performance by avoiding repeated parsing of the dataset.
  • Integration with Series Management: Works with the Image Manager to organize and retrieve frame-specific metadata and pixel data.
  • Custom Image Creation: Generates Cornerstone-compatible image objects for rendering frames.
  • DSA Integration: Supports Digital Subtraction Angiography (DSA) images for specialized visualization.

Internal Workflow

  1. Dataset Parsing:
    • Metadata for each frame is parsed and stored in the Image Manager.
  2. Image ID Management:
    • Custom image IDs are generated for each frame in the series
  3. Frame Caching:
    • Frames are cached to avoid re-parsing the dataset for subsequent requests.
  4. Custom Image Creation:
    • Each frame is processed into a Cornerstone-compatible image object, including pixel data extraction and scaling.

Main Functions

loadMultiFrameImage

Syntax:

loadMultiFrameImage(imageId: string): ImageLoadObject

Parameters:

ParameterTypeDescription
imageIdstringThe ID of the image/frame to be loaded.

Returns:

ImageLoadObject – An object containing a Promise that resolves to the loaded image.


buildMultiFrameImage

Syntax:

buildMultiFrameImage(uniqueUID: string, serie: Series): void

Parameters:

ParameterTypeDescription
uniqueUIDstringA unique identifier for the multiframe series.
serieSeriesThe parsed series object.

Returns:

void – Parses metadata for each frame in the series and generates frame-specific image IDs and organizes metadata.


getMultiFrameImageId

Syntax:

getMultiFrameImageId(customLoaderName: string): string

Parameters:

ParameterTypeDescription
customLoaderNamestringThe name of the custom image loader.

Returns:

string – A unique image ID for the loader.


clearMultiFrameCache

Syntax:

clearMultiFrameCache(seriesId: string): void

Parameters:

ParameterTypeDescription
seriesIdstringThe ID of the series to clear from the cache.

Returns:

void – Clears the cache for multiframe datasets.


D/Vision Lab
Last Updated:
Contributors: Laura Borghesi, Simone "Lateralus" Manini
Prev
DICOM Loader
Next
SingleFrame Loader