navigate Logo

Getting Started

  • Quick Start Guide
  • Software Installation
  • I Want To…

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
  • Feature Container
  • REST-API
  • Plugin Architecture

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.log_files
    • navigate.model
      • navigate.model.analysis
      • navigate.model.concurrency
      • navigate.model.data_sources
      • navigate.model.device_startup_functions
      • navigate.model.devices
      • navigate.model.features
        • navigate.model.features.adaptive_optics
        • navigate.model.features.auto_tile_scan
        • navigate.model.features.autofocus
        • navigate.model.features.common_features
        • navigate.model.features.feature_container
        • navigate.model.features.feature_related_functions
        • navigate.model.features.image_writer
        • navigate.model.features.remove_empty_tiles
        • navigate.model.features.restful_features
        • navigate.model.features.update_setting
        • navigate.model.features.volume_search
      • navigate.model.metadata_sources
      • navigate.model.microscope
      • navigate.model.model
      • navigate.model.plugins_model
      • navigate.model.waveforms
    • navigate.tools
    • navigate.view
navigate
  • Acquiring Data
  • Currently Implemented Features
  • navigate.model.features.common_features
  • navigate.model.features.common_features.ZStackAcquisition
  • View page source

navigate.model.features.common_features.ZStackAcquisition

class navigate.model.features.common_features.ZStackAcquisition(model, get_origin=False, saving_flag=False, saving_dir='z-stack', force_multiposition=False)

Bases: object

ZStackAcquisition class for controlling z-stack acquisition in microscopy.

This class provides functionality to control z-stack acquisition, including managing z and focus positions, acquiring image data, and handling multi-channel acquisitions.

Notes:

  • This class is used to control z-stack acquisition during microscopy experiments,

allowing for position cycling, multi-channel acquisitions, and image saving.

  • The z-stack acquisition process involves initializing parameters, controlling

position and focus movements, handling data acquisition, and managing data threads.

  • The config_table attribute defines the configuration for the z-stack acquisition

process, including signal acquisition, data handling, and node type.

__init__(model, get_origin=False, saving_flag=False, saving_dir='z-stack', force_multiposition=False)

Initialize the ZStackAcquisition class.

Parameters:

modelMicroscopeModel

The microscope model object used for z-stack acquisition control.

get_originbool, optional

Flag to determine whether to get the z and focus origin positions. Default is False.

saving_flagbool, optional

Flag to enable image saving during z-stack acquisition. Default is False.

saving_dirstr, optional

The sub-directory for saving z-stack images. Default is “z-stack”.

Methods

__init__(model[, get_origin, saving_flag, ...])

Initialize the ZStackAcquisition class.

cleanup_data_func()

Perform cleanup actions after data acquisition, if image saving is enabled.

end_data_func()

Check if all expected data frames have been received.

in_data_func(frame_ids)

Handle incoming data frames during data acquisition.

pre_data_func()

Initialize data-related parameters before data acquisition.

pre_signal_func()

Initialize z-stack acquisition parameters before the signal stage.

signal_end()

Handle the end of the signal stage and position cycling.

signal_func()

Control z-stack acquisition, move positions, and manage data threads.

update_channel()

Update the active channel during multi-channel acquisition.

Attributes

model

The microscope model associated with z-stack acquisition.

get_origin

Flag to determine whether to get the z and focus origin positions.

number_z_steps

The number of z steps in the z-stack.

start_z_position

The start z position for the z-stack.

start_focus

The start focus position for the z-stack.

z_step_size

The z step size for the z-stack.

focus_step_size

The z stack distance for the z-stack.

positions

A dictionary defining the multi-position table for z-stack acquisition.

current_position_idx

The current index of the position being acquired in the multi-position

current_z_position

The z position of the channel being acquired in the z-stack

current_focus_position

The f position of the channel being acquired in the z-stack

need_to_move_new_position

Flag to determine whether to move to a new position

need_to_move_z_position

Flag to determine whether to move the z position

z_position_moved_time

The number of times the z position has been moved

defocus

A dictionary defining the defocus values between channels

stack_cycling_mode

The stack cycling mode for z-stack acquisition.

channels

The number of channels in the z-stack.

force_multiposition

Force multiposition

image_writer

An image writer object for saving z-stack images.

config_table

A dictionary defining the configuration for the z-stack acquisition

cleanup_data_func()

Perform cleanup actions after data acquisition, if image saving is enabled.

This method performs cleanup actions after data acquisition, such as cleaning up

image writing, if image saving is enabled.

end_data_func()

Check if all expected data frames have been received.

This method checks whether all expected data frames have been received during data acquisition.

Returns:

bool

A boolean value indicating whether all expected data frames have been received.

in_data_func(frame_ids)

Handle incoming data frames during data acquisition.

This method handles incoming data frames during data acquisition, updating the count of received frames and saving images if enabled.

Parameters:

frame_idslist

A list of frame IDs received during data acquisition.

pre_data_func()

Initialize data-related parameters before data acquisition.

This method initializes data-related parameters before data acquisition, including the count of received and expected frames.

pre_signal_func()

Initialize z-stack acquisition parameters before the signal stage.

This method initializes z-stack acquisition parameters, including position, focus, and data thread management, before the signal stage.

signal_end()

Handle the end of the signal stage and position cycling.

This method handles the end of the signal stage, including position cycling and channel updates for multi-channel acquisitions.

Returns:

bool

A boolean value indicating whether to end the current node.

signal_func()

Control z-stack acquisition, move positions, and manage data threads.

This method controls the z-stack acquisition process, including moving positions and focus, managing data threads, and handling data acquisition during the signal stage.

Returns:

bool

A boolean value indicating whether to continue the z-stack acquisition process.

update_channel()

Update the active channel during multi-channel acquisition.

This method updates the active channel for multi-channel acquisitions, allowing cycling through channels.

channels

The number of channels in the z-stack.

Type:

int

config_table

A dictionary defining the configuration for the z-stack acquisition

Type:

dict

current_focus_position

The f position of the channel being acquired in the z-stack

Type:

int

current_position_idx

The current index of the position being acquired in the multi-position

Type:

int

current_z_position

The z position of the channel being acquired in the z-stack

Type:

int

defocus

A dictionary defining the defocus values between channels

Type:

dict

focus_step_size

The z stack distance for the z-stack.

Type:

float

force_multiposition

Force multiposition

Type:

bool

get_origin

Flag to determine whether to get the z and focus origin positions.

Type:

bool

image_writer

An image writer object for saving z-stack images.

Type:

ImageWriter

model

The microscope model associated with z-stack acquisition.

Type:

MicroscopeModel

need_to_move_new_position

Flag to determine whether to move to a new position

Type:

bool

need_to_move_z_position

Flag to determine whether to move the z position

Type:

bool

number_z_steps

The number of z steps in the z-stack.

Type:

int

positions

A dictionary defining the multi-position table for z-stack acquisition.

Type:

dict

stack_cycling_mode

The stack cycling mode for z-stack acquisition.

Type:

str

start_focus

The start focus position for the z-stack.

Type:

float

start_z_position

The start z position for the z-stack.

Type:

float

z_position_moved_time

The number of times the z position has been moved

Type:

int

z_step_size

The z step size for the z-stack.

Type:

float

Previous Next

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