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.metadata_sources
        • navigate.model.metadata_sources.bdv_metadata
        • navigate.model.metadata_sources.metadata
        • navigate.model.metadata_sources.ome_tiff_metadata
        • navigate.model.metadata_sources.zarr_metadata
      • navigate.model.microscope
      • navigate.model.model
      • navigate.model.plugins_model
      • navigate.model.waveforms
    • navigate.tools
    • navigate.view
navigate
  • Software API
  • navigate.model
  • navigate.model.metadata_sources
  • navigate.model.metadata_sources.bdv_metadata
  • navigate.model.metadata_sources.bdv_metadata.BigDataViewerMetadata
  • View page source

navigate.model.metadata_sources.bdv_metadata.BigDataViewerMetadata

class navigate.model.metadata_sources.bdv_metadata.BigDataViewerMetadata

Bases: XMLMetadata

Metadata for BigDataViewer files.

Note

XML spec in section 2.3 of https://arxiv.org/abs/1412.0488.

__init__() → None

Initialize the BigDataViewer metadata object.

Parameters:

configuration (Optional[Dict[str, Any]]) – Configuration dictionary.

Methods

__init__()

Initialize the BigDataViewer metadata object.

affine_matrix_to_stage_positions(mat)

Convert affine matrix back into stage positions.

bdv_rotate_transform()

Calculate the BDV rotation transform matrix.

bdv_shear_transform()

Calculate the shear transform matrix.

bdv_xml_dict(file_name, views, **kw)

Create a BigDataViewer XML dictionary from a list of views.

get_affine_parameters(configuration)

Get the affine transform parameters from the configuration file.

parse_xml(root)

Parse a BigDataViewer XML file into our metadata format.

set_from_configuration_experiment()

Set from configuration experiment

set_from_dict(metadata_config)

Set from a dictionary

set_shape_from_configuration_experiment()

Set shape from configuration experiment

set_stack_order_from_configuration_experiment()

Set stack order from configuration experiment

stage_positions_to_affine_matrix(x, y, z, theta)

Convert stage positions to an affine matrix.

to_xml(file_type[, root])

Convert stored metadata to XML

write_xml(file_name, views)

Write BigDataViewer XML metadata.

Attributes

configuration

Return configuration dictionary

per_stack

Return per stack

shape

Return shape as XYCZT.

voxel_size

Return voxel size

shear_data

Shear the data.

shear_dimension

Dimension to shear the data.

shear_angle

Angle in degrees to shear the data.

shear_transform

Shear transform matrix.

rotate_data

Rotate the data.

rotate_angle_x

Angle in degrees to rotate the data in X.

rotate_angle_y

Angle in degrees to rotate the data in Y.

rotate_angle_z

Angle in degrees to rotate the data in Z.

rotate_transform

Rotation transform matrix.

affine_matrix_to_stage_positions(mat: Union[_SupportsArray[dtype], _NestedSequence[_SupportsArray[dtype]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]) → tuple

Convert affine matrix back into stage positions.

Ignore theta, focus for now.

Parameters:

mat (npt.ArrayLike) – An affine matrix.

Returns:

A tuple of stage positions.

Return type:

tuple

bdv_rotate_transform()

Calculate the BDV rotation transform matrix.

BDV-specific. Matrix provided is not (4,4), but (3,4).

bdv_shear_transform()

Calculate the shear transform matrix.

BDV-specific. Matrix provided is not (4,4), but (3,4).

bdv_xml_dict(file_name: Optional[Union[str, list]], views: list, **kw) → dict

Create a BigDataViewer XML dictionary from a list of views.

Parameters:
  • file_name (str) – The file name of the file to be written.

  • views (list) – A list of dictionaries containing metadata for each view.

  • **kw – Additional keyword arguments.

Returns:

A dictionary containing the XML metadata.

Return type:

dict

get_affine_parameters(configuration)

Get the affine transform parameters from the configuration file.

Parameters:

configuration (dict) – Configuration dictionary.

parse_xml(root: Union[str, Element]) → tuple

Parse a BigDataViewer XML file into our metadata format.

Parameters:

root (Union[str, ET.Element]) – The root of the XML tree.

Returns:

A tuple containing the file path, setups, and transforms.

Return type:

tuple

set_from_configuration_experiment() → None

Set from configuration experiment

set_from_dict(metadata_config: dict) → None

Set from a dictionary

Parameters:

metadata_config (dict) – dictionary of metadata: “c”, “z”, “t”, “p”, “is_dynamic”, “per_stack”

set_shape_from_configuration_experiment() → None

Set shape from configuration experiment

set_stack_order_from_configuration_experiment() → None

Set stack order from configuration experiment

stage_positions_to_affine_matrix(x: float, y: float, z: float, theta: float, f: Optional[float] = None) → Union[_SupportsArray[dtype], _NestedSequence[_SupportsArray[dtype]], bool, int, float, complex, str, bytes, _NestedSequence[Union[bool, int, float, complex, str, bytes]]]

Convert stage positions to an affine matrix.

Ignore theta, focus for now.

Parameters:
  • x (float) – The x position of the stage.

  • y (float) – The y position of the stage.

  • z (float) – The z position of the stage.

  • theta (float) – The theta position of the stage.

  • f (Optional[float]) – The focus position of the stage, by default None

Returns:

An affine matrix.

Return type:

npt.ArrayLike

to_xml(file_type: str, root: Optional[str] = None, **kw) → str

Convert stored metadata to XML

Parameters:
  • file_type (str) – File type

  • root (Optional[str]) – Root, by default None

  • **kw – Keyword arguments

Returns:

XML string

Return type:

str

write_xml(file_name: str, views: list) → None

Write BigDataViewer XML metadata.

Parameters:
  • file_name (str) – The file name of the file to be written.

  • views (list) – A list of dictionaries containing metadata for each view.

active_microscope

Active microscope

Type:

str

property configuration: Optional[DictProxy]

Return configuration dictionary

Returns:

configuration – Configuration dictionary

Return type:

Optional[DictProxy]

dc

Step size between channels, should always be 1

Type:

int

dt

Time displacement (s)

Type:

float

dx

Pixel size in x (um) float: Pixel size in y (um) float: Pixel size in z (um)

Type:

float

dy

Pixel size in x (um) float: Pixel size in y (um) float: Pixel size in z (um)

Type:

float

dz

Pixel size in x (um) float: Pixel size in y (um) float: Pixel size in z (um)

Type:

float

misc

misc notes

Type:

str

property per_stack: bool

Return per stack

Returns:

True if per stack, False otherwise

Return type:

bool

positions

Number of positions

Type:

int

rotate_angle_x

Angle in degrees to rotate the data in X.

Type:

float

rotate_angle_y

Angle in degrees to rotate the data in Y.

Type:

float

rotate_angle_z

Angle in degrees to rotate the data in Z.

Type:

float

rotate_data

Rotate the data.

Type:

bool

rotate_transform

Rotation transform matrix.

Type:

npt.NDArray

property shape: tuple

Return shape as XYCZT.

Returns:

Shape as XYCZT

Return type:

tuple

shape_c

Shape of the data in x int: Shape of the data in y int: Shape of the data in z int: Shape of the data in t int: Shape of the data in c

Type:

int

shape_t

Shape of the data in x int: Shape of the data in y int: Shape of the data in z int: Shape of the data in t int: Shape of the data in c

Type:

int

shape_x

Shape of the data in x int: Shape of the data in y int: Shape of the data in z int: Shape of the data in t int: Shape of the data in c

Type:

int

shape_y

Shape of the data in x int: Shape of the data in y int: Shape of the data in z int: Shape of the data in t int: Shape of the data in c

Type:

int

shape_z

Shape of the data in x int: Shape of the data in y int: Shape of the data in z int: Shape of the data in t int: Shape of the data in c

Type:

int

shear_angle

Angle in degrees to shear the data.

Type:

float

shear_data

Shear the data.

Type:

bool

shear_dimension

Dimension to shear the data.

Type:

str

shear_transform

Shear transform matrix.

Type:

npt.NDArray

property voxel_size: tuple

Return voxel size

Returns:

Voxel size

Return type:

tuple

Previous Next

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