pyfibre.model.core.base_segment module

class pyfibre.model.core.base_segment.BaseSegment(region=None)[source]

Bases: pyfibre.model.core.base_pyfibre_object.BasePyFibreObject

Container for a scikit-image regionprops object representing a segmented area of an image

classmethod from_array(array, intensity_image=None)[source]

Deserialises numpy array to return an instance of the class

classmethod from_json(data)[source]

Deserialises JSON data dictionary to return an instance of the class

generate_database(image_tag=None)[source]

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

abstract get_tag()[source]

String representing class type

property tag
to_array(shape=None)[source]

Return the object state in a form that can be serialised as a numpy array

to_json()[source]

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