CnmfeSegmentationExtractor#

class CnmfeSegmentationExtractor(file_path: str | Path)[source]#

Bases: SegmentationExtractor

A segmentation extractor for CNMF-E ROI segmentation method.

This class inherits from the SegmentationExtractor class, having all its functionality specifically applied to the dataset output from the ‘CNMF-E’ ROI segmentation method.

Create a CnmfeSegmentationExtractor from a .mat file.

Parameters:

file_path (str) – The location of the folder containing dataset.mat file.

__del__()[source]#

Close the file when the object is deleted.

get_frame_shape()[source]#

Get the frame shape (height, width) of the movie.

Returns:

The frame shape as (height, width).

Return type:

tuple

get_native_timestamps(start_sample: int | None = None, end_sample: int | None = None) ndarray | None[source]#

Get the original timestamps from the data source.

Parameters:
  • start_sample (int, optional) – Start sample index (inclusive).

  • end_sample (int, optional) – End sample index (exclusive).

Returns:

timestamps – The original timestamps in seconds, or None if not available.

Return type:

np.ndarray or None