BrukerTiffImagingExtractors#
ImagingExtractors for the TIFF image format produced by Bruker.
Classes#
- BrukerTiffSinglePlaneImagingExtractor
A ImagingExtractor for TIFF files produced by Bruker with only 1 plane.
- BrukerTiffMultiPlaneImagingExtractor
A MultiImagingExtractor for TIFF files produced by Bruker with multiple planes.
- filter_read_uic_tag_warnings(record)[source]#
Filter out the warnings from tifffile.read_uic_tag() that are not relevant to the user.
- class BrukerTiffMultiPlaneImagingExtractor(folder_path: str | Path, stream_name: str | None = None)[source]#
Bases:
MultiImagingExtractorA MultiImagingExtractor for TIFF files produced by Bruke with multiple planes.
This format consists of multiple TIF image files (.ome.tif) and configuration files (.xml, .env).
Create a BrukerTiffMultiPlaneImagingExtractor instance from a folder path that contains the image files.
- Parameters:
folder_path (PathType) – The path to the folder that contains the Bruker TIF image files (.ome.tif) and configuration files (.xml, .env).
stream_name (str, optional) – The name of the recording channel (e.g. “Ch2”).
- Raises:
ValueError – If more than one recording stream is detected.
ValueError – If the selected stream is not in the available plane_streams.
AssertionError – If the TIF image files are missing from the folder.
AssertionError – If the imaging is not volumetric.
- classmethod get_streams(folder_path: str | Path) dict[source]#
Get the available streams from the Bruker TIF image files (.ome.tif) and configuration files (.xml, .env).
- Parameters:
folder_path (PathType) – The path to the folder that contains the Bruker TIF image files (.ome.tif) and configuration files (.xml, .env).
- Returns:
streams – The dictionary of available streams.
- Return type:
dict
- get_image_shape() tuple[int, int][source]#
Get the shape of the video frame (num_rows, num_columns).
- Returns:
image_shape – Shape of the video frame (num_rows, num_columns).
- Return type:
tuple
- get_num_samples() int[source]#
Get the number of samples in the video.
- Returns:
num_samples – Number of samples in the video.
- Return type:
int
- get_sampling_frequency() float[source]#
Get the sampling frequency in Hz.
- Returns:
sampling_frequency – Sampling frequency in Hz.
- Return type:
float
- get_series(start_sample: int | None = None, end_sample: int | None = None) ndarray[source]#
Get the video frames.
- Parameters:
start_sample (int, optional) – Start sample index (inclusive).
end_sample (int, optional) – End sample index (exclusive).
- Returns:
series – The video frames.
- Return type:
numpy.ndarray
- class BrukerTiffSinglePlaneImagingExtractor(folder_path: str | Path, stream_name: str | None = None)[source]#
Bases:
MultiImagingExtractorA MultiImagingExtractor for TIFF files produced by Bruker with only 1 plane.
Create a BrukerTiffSinglePlaneImagingExtractor instance from a folder path that contains the image files.
- Parameters:
folder_path (PathType) – The path to the folder that contains the Bruker TIF image files (.ome.tif) and configuration files (.xml, .env).
stream_name (str, optional) – The name of the recording channel (e.g. “Ch2” or “Green”).
- classmethod get_streams(folder_path: str | Path) dict[source]#
Get the available streams from the Bruker TIF image files (.ome.tif) and configuration files (.xml, .env).
- Parameters:
folder_path (PathType) – The path to the folder that contains the Bruker TIF image files (.ome.tif) and configuration files (.xml, .env).
- Returns:
streams – The dictionary of available streams.
- Return type:
dict
- static get_available_channels(folder_path: str | Path) set[str][source]#
Extract set of available channel names from the XML configuration file in the specified folder.
- Parameters:
folder_path (PathType) – The path to the folder containing the XML configuration file. It can be either a string or a Path object.
- Returns:
A set of channel names available in the first ‘Frame’ element found in the XML configuration file.
- Return type:
Set[str]
- get_image_shape() tuple[int, int][source]#
Get the shape of the video frame (num_rows, num_columns).
- Returns:
image_shape – Shape of the video frame (num_rows, num_columns).
- Return type:
tuple
- get_sampling_frequency() float[source]#
Get the sampling frequency in Hz.
- Returns:
sampling_frequency – Sampling frequency in Hz.
- Return type:
float