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

The Image Manager

The Image Manager Module provides core functionalities for managing and loading DICOM data, including parsing, organizing, and storing series, instances, and associated metadata. It acts as a central store and utility set for handling DICOM imaging workflows.

Key Responsibilities

  • DICOM Data Management: Manages series, instances, and metadata for parsed DICOM files.
  • Custom Loader Integration: Supports multiframe images, GSPS (Grayscale Softcopy Presentation State), and image frame extraction.
  • Memory Management: Handles resetting, cleaning, and efficient storage of large datasets.
  • Image Tracker: Maps image IDs to series for efficient retrieval.
  • Metadata Access: Allows querying of series, instances, and image metadata.

Image Tracker

The Image Tracker is a utility within the Image Manager ecosystem that maps image IDs to their associated series. It is primarily used for efficient tracking and retrieval of images across series, enabling streamlined workflows for parsing, loading, and managing DICOM data.

The Image Tracker serves as a lookup table to:

  • Map Image IDs to Series: Tracks which series each image belongs to.
  • Enhance Performance: Enables quick retrieval of series information for a given image ID.
  • Facilitate Series Management: Supports series-specific operations by associating images with their respective series.
  1. Mapping Image IDs to Series:

    • Each imageId is mapped to the corresponding uniqueUID.
  2. Dynamic Updates:

    • The tracker is updated dynamically during parsing and series loading workflows.
  3. Integration with Series Management:

    • The tracker is seamlessly integrated with the Image Manager for series-based operations.

Main Functions

updateImageManager

Updates and initializes the Image Manager to parse and load a single DICOM object.

Syntax:

updateImageManager(
  imageObject: ImageObject,
  customId?: string,
  sliceIndex?: number
): ImageManager

Parameters:

ParameterTypeDescription
imageObjectImageObjectA single DICOM object containing metadata and data.
customIdstring (Optional)Custom ID to overwrite the default uniqueUID.
sliceIndexnumber (Optional)Index to overwrite default slice ordering.

Returns:

ImageManager – The updated Image Manager.


populateImageManager

Populates the Image Manager with a specific dicom dataset.

Syntax:

populateImageManager(
  uniqueUID: string,
  seriesData: Series
): ImageManager

Parameters:

ParameterTypeDescription
uniqueUIDstringThe unique ID for the dataset.
seriesDatastringData to populate.

Returns:

ImageManager – The updated Image Manager with added dicom dataset.


getImageManager

Retrieves the Image Manager, initializing it if necessary.

Syntax:

getImageManager(): ImageManager

Returns:

ImageManager – The current Image manager object.


resetImageManager

Resets the Image Manager, clearing all stored datasets and metadata.

Syntax:

resetImageManager(): void

removeDataFromImageManager

Removes a specific dataset from the Image Manager.

Syntax:

removeDataFromImageManager(uniqueUID: string): void

Parameters:

ParameterTypeDescription
uniqueUIDstringThe unique ID for the dataset.

getDataFromImageManager

Retrieves the data for a specific dataset.

Syntax:

getDataFromImageManager(uniqueUID: string): Series | null

Parameters:

ParameterTypeDescription
uniqueUIDstringThe unique ID for the series.

Returns:

Series – The series data, or null if not found.


getSopInstanceUIDFromImageManager

Return the SOP Instance UID of a specific imageId stored in the Image Manager.

Syntax:

getSopInstanceUIDFromImageManager(uniqueUID:string, imageId: string): string | null

Parameters:

ParameterTypeDescription
uniqueUIDstringThe unique ID for the series.
imageIdstringThe unique ID for the image.

Returns:

SopInstanceUID – The SOP Instance UID of the image, or null if not found.


getImageTracker

Retrieves the image tracker that maps image IDs to series.

Syntax:

getImageTracker(): ImageTracker

Returns:

ImageTracker – The current image tracker.


D/Vision Lab
Last Updated:
Contributors: Laura Borghesi, Simone "Lateralus" Manini
Next
GSPS Manager