pyfibre.model.core.base_pyfibre_object module

class pyfibre.model.core.base_pyfibre_object.BasePyFibreObject[source]

Bases: abc.ABC

Abstract base class for an object representing an extracted feature in a multi-image. Serialization and de-serialization routines must be implemented with a concrete base subclass, along with a method that generates a pandas database containing metrics.

abstract classmethod from_array(array, **kwargs)[source]

Deserialises numpy array to return an instance of the class

abstract classmethod from_json(data)[source]

Deserialises JSON data dictionary to return an instance of the class

abstract generate_database(*args, **kwargs)[source]

Generates a Pandas database with all graph and segment metrics for assigned image

abstract to_array(**kwargs)[source]

Serialises instance into a numpy array able to be dumped as a numpy binary file

abstract to_json()[source]

Serialises instance into a dictionary able to be dumped as a JSON file