navigate Logo

Getting Started

  • Computer Considerations
  • Computer Power Configuration
  • Software Installation
  • Launching Navigate
  • Configuring Navigate
  • Acquiring Data
  • Smart Acquisition Routines

User Guide

  • Supported Hardware
  • Supported File Formats
  • User Interface Walkthrough
  • Setting Up a Microscope
  • Acquiring Data
  • Case Studies

Development

  • Contributing Guidelines
  • Developer Install
  • Software Architecture
  • Developer Architecture Concepts
  • Feature Container
  • REST API
  • Plugin Architecture
  • Adding New Hardware

Troubleshooting & Known Issues

  • Troubleshooting
  • Known Issues

Plugins

  • navigate Plugin Template
  • navigate Confocal Projection
  • navigate at Scale
  • navigate Constant Velocity Acquisition
  • navigate MMCore
  • navigate ilastik Server
  • navigate Photoactivation

Reference

  • Implemented Microscopes
  • Software API
    • navigate.config
    • navigate.controller
      • navigate.controller.configuration_controller
      • navigate.controller.configurator
      • navigate.controller.controller
      • navigate.controller.sub_controllers
        • navigate.controller.sub_controllers.acquire_bar
        • navigate.controller.sub_controllers.adaptive_optics
        • navigate.controller.sub_controllers.autofocus
        • navigate.controller.sub_controllers.camera_map
        • navigate.controller.sub_controllers.camera_settings
        • navigate.controller.sub_controllers.camera_view
        • navigate.controller.sub_controllers.channels_settings
        • navigate.controller.sub_controllers.channels_tab
        • navigate.controller.sub_controllers.diagnostics_popup
        • navigate.controller.sub_controllers.feature_advanced_setting
        • navigate.controller.sub_controllers.features_popup
        • navigate.controller.sub_controllers.gui
        • navigate.controller.sub_controllers.histogram
        • navigate.controller.sub_controllers.ilastik
        • navigate.controller.sub_controllers.keystrokes
        • navigate.controller.sub_controllers.menus
        • navigate.controller.sub_controllers.microscope_popup
        • navigate.controller.sub_controllers.multiposition
        • navigate.controller.sub_controllers.plugins
        • navigate.controller.sub_controllers.stages
        • navigate.controller.sub_controllers.stages_advanced
        • navigate.controller.sub_controllers.tiling
        • navigate.controller.sub_controllers.waveform_popup
        • navigate.controller.sub_controllers.waveform_tab
      • navigate.controller.thread_pool
    • navigate.controller.configurator
    • navigate.log_files
    • navigate.model
    • navigate.tools
    • navigate.view
navigate
  • Software API
  • navigate.controller
  • navigate.controller.sub_controllers
  • navigate.controller.sub_controllers.camera_view
  • navigate.controller.sub_controllers.camera_view.SpooledImageLoader
  • View page source

navigate.controller.sub_controllers.camera_view.SpooledImageLoader

class navigate.controller.sub_controllers.camera_view.SpooledImageLoader(channels: int, size_y: int, size_x: int)

Bases: object

A class to lazily load images from disk using a spooled temporary file.

__init__(channels: int, size_y: int, size_x: int) → None

Initialize the SpooledImageLoader.

Parameters:

channels (int) – The number of channels.

Methods

__init__(channels, size_y, size_x)

Initialize the SpooledImageLoader.

get_default_directory()

Get the default directory for storing temporary files.

get_default_max_size()

Get the default max_size based on the total RAM.

get_indices(slice_index)

Get the indices of the images stored in the spooled files.

load_image(channel, slice_index)

Load an image from a temporary file.

save_image(image, channel, slice_index)

Save an image to a temporary file.

Attributes

channels

The number of channels.

n_bytes

The number of bytes in the image.

size_y

The height of the image.

size_x

The width of the image.

temp_files

The temporary files.

static get_default_directory() → str

Get the default directory for storing temporary files.

Default directory is within the .navigate directory.

Returns:

The default directory for storing temporary files.

Return type:

str

static get_default_max_size() → int

Get the default max_size based on the total RAM.

Returns:

The default max_size in bytes. By default, half the available RAM.

Return type:

int

get_indices(slice_index: int) → tuple

Get the indices of the images stored in the spooled files.

Parameters:

slice_index (int) – The slice index.

Returns:

The start and end indices of the images.

Return type:

tuple[int, int]

load_image(channel: int, slice_index: int) → ndarray

Load an image from a temporary file.

Parameters:
  • channel (int) – The channel of the image.

  • slice_index (int) – The slice index of the image.

Returns:

The image data or None if the image could not be loaded.

Return type:

np.ndarray or None

save_image(image: ndarray, channel: int, slice_index: int) → None

Save an image to a temporary file.

Parameters:
  • image (np.ndarray) – The image to save.

  • channel (int) – The channel of the image.

  • slice_index (int) – The slice index of the image.

channels

The number of channels.

Type:

int

n_bytes

The number of bytes in the image.

Type:

int

size_x

The width of the image.

Type:

int

size_y

The height of the image.

Type:

int

temp_files: Dict[int, SpooledTemporaryFile]

The temporary files.

Type:

Dict[int, tempfile.SpooledTemporaryFile]

Previous Next

© Copyright 2026, Dean Lab, UT Southwestern Medical Center.