meerkat.cells package

Submodules

meerkat.cells.abstract module

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

Bases: abc.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: meerkat.cells.abstract.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: meerkat.cells.abstract.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.volume module

class MedicalVolumeCell(paths: Union[str, pathlib.Path, os.PathLike, Sequence[Union[str, pathlib.Path, os.PathLike]]], loader: Optional[Callable] = None, transform: Optional[Callable] = None, cache_metadata: bool = False, *args, **kwargs)[source]

Bases: meerkat.mixins.file.PathsMixin, meerkat.cells.abstract.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[pathlib.Path], *args, **kwargs)[source]
classmethod from_state(state, *args, **kwargs)[source]
get(*args, cache_metadata: Optional[bool] = 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]

Module contents