sleap.io.format.leap_matlab

Adaptor to read (not write) LEAP MATLAB data files.

This attempts to find videos. If they cannot automatically be found and the gui param is True, then the user will be prompted to find the videos.

class sleap.io.format.leap_matlab.LabelsLeapMatlabAdaptor[source]
property all_exts

List of all file extensions supported by adaptor.

can_read_file(file: sleap.io.format.filehandle.FileHandle)[source]

Returns whether this adaptor can read this file.

can_write_filename(filename: str)[source]

Returns whether this adaptor can write format of this filename.

property default_ext

The default file extension, e.g., ‘json’ (without ‘.’).

does_read() bool[source]

Returns whether this adaptor supports reading.

does_write() bool[source]

Returns whether this adaptor supports writing.

property handles

Returns the type of object that can be read/written.

The Dispatch class calls this method on all registered adaptors to determine which to use for reading/writing.

property name

Human-reading name of the file format

classmethod read(file: sleap.io.format.filehandle.FileHandle, gui: bool = True, *args, **kwargs)[source]

Reads the file and returns the appropriate deserialized object.