roiextractors.extractors.simaextractor package#

Submodules#

roiextractors.extractors.simaextractor.simasegmentationextractor module#

A segmentation extractor for Sima.

Classes#

SimaSegmentationExtractor

A segmentation extractor for Sima.

class SimaSegmentationExtractor(file_path: str | Path, sima_segmentation_label: str = 'auto_ROIs')[source]#

Bases: SegmentationExtractor

A segmentation extractor for Sima.

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

Create a SegmentationExtractor instance from a sima file.

Parameters:
  • file_path (str or Path) – The location of the folder containing dataset.sima file and the raw image file(s) (tiff, h5, .zip)

  • sima_segmentation_label (str) – name of the ROIs in the dataset from which to extract all ROI info

extractor_name = 'SimaSegmentation'#
installed = False#
is_writable = False#
mode = 'file'#
installation_mesg = 'To use the SimaSegmentationExtractor install sima and dill: \n\n pip install sima/dill\n\n'#
static _convert_sima(old_pkl_loc)[source]#

Convert the sima file to python 3 pickle.

This function is used to convert python 2 pickles to python 3 pickles. Forward compatibility of ‘*.sima’ files containing .pkl dataset, rois, sequences, signals, time_averages.

Replaces the pickle file with a python 3 version with the same name. Saves the old Py2 pickle as ‘oldpicklename_p2.pkl’

Parameters:

old_pkl_loc (str) – Path of the pickle file to be converted

_file_extractor_read()[source]#

Read the sima file and return the sima.ImagingDataset object.

_image_mask_extractor_read()[source]#

Read the image mask from the sima.ImagingDataset object (self._dataset_file).

_trace_extractor_read()[source]#

Read the traces from the sima.ImagingDataset object (self._dataset_file).

_summary_image_read()[source]#

Read the summary image from the sima.ImagingDataset object (self._dataset_file).

get_accepted_list()[source]#

Get a list of accepted ROI ids.

Returns:

accepted_list – List of accepted ROI ids.

Return type:

list

get_rejected_list()[source]#

Get a list of rejected ROI ids.

Returns:

rejected_list – List of rejected ROI ids.

Return type:

list

static write_segmentation(segmentation_object, savepath)[source]#

Write a segmentation object to a file.

Notes

This function is not implemented for this extractor.

get_image_size()[source]#

Get frame size of movie (height, width).

Returns:

no_rois – 2-D array: image height x image width

Return type:

array_like

_abc_impl = <_abc._abc_data object>#

Module contents#

A segmentation extractor for Sima.

Modules#

simasegmentationextractor

A segmentation extractor for Sima.

Classes#

SimaSegmentationExtractor

A segmentation extractor for Sima.