meerkat.cells package#

Submodules#

meerkat.cells.abstract module#

class AbstractCell(*args, **kwargs)[source]#

Bases: ABC

get(*args, **kwargs) object[source]#

Get me the thing that this cell exists for.

loader(*args, **kwargs) object[source]#
property metadata: dict#

Get the metadata associated with this cell.

meerkat.cells.spacy module#

class LazySpacyCell(text: str, nlp: spacy.language.Language, *args, **kwargs)[source]#

Bases: AbstractCell

default_loader(*args, **kwargs)[source]#
classmethod from_state(state, nlp: spacy.language.Language)[source]#
get(*args, **kwargs)[source]#

Get me the thing that this cell exists for.

get_state()[source]#
class SpacyCell(doc: spacy_tokens.Doc, *args, **kwargs)[source]#

Bases: AbstractCell

default_loader(*args, **kwargs)[source]#
classmethod from_state(state, nlp: spacy.language.Language)[source]#
get(*args, **kwargs)[source]#

Get me the thing that this cell exists for.

get_state()[source]#

meerkat.cells.video module#

class VideoCell(filepath: str, transform: Callable | None = None, time_dim: int | None = 1)[source]#

Bases: AbstractCell

Interface for loading video data.

Examples:

# Load a video from “/path/to/video.mp4”, where the time dimension has index one >>> cell = VideoCell(“/path/to/video.mp4”, time_dim=1)

get()[source]#

Get me the thing that this cell exists for.

meerkat.cells.volume module#

class MedicalVolumeCell(paths: str | Path | PathLike | Sequence[str | Path | PathLike], loader: Callable | None = None, transform: Callable | None = None, cache_metadata: bool = False, *args, **kwargs)[source]#

Bases: PathsMixin, AbstractCell

Interface for loading medical volume data.

Examples

# Specify xray dicoms with default orientation ("SI", "AP"): >>> cell = MedicalVolumeCell(“/path/to/xray.dcm”, loader=DicomReader(group_by=None, default_ornt=(“SI”, “AP”))

# Load multi-echo MRI volumes >>> cell = MedicalVolumeCell(“/path/to/mri/scan/dir”, loader=DicomReader(group_by=”EchoNumbers”))

clear_metadata()[source]#
classmethod default_loader(paths: Sequence[Path], *args, **kwargs)[source]#
classmethod from_state(state, *args, **kwargs)[source]#
get(*args, cache_metadata: bool | None = None, **kwargs)[source]#

Get me the thing that this cell exists for.

get_metadata(ignore_bytes: bool = False, readable: bool = False, as_raw_type: bool = False, force_load: bool = False) Dict[source]#
get_state()[source]#