https://github.com/turleyjm/cell-division-dl-plugin
Tip revision: f6c3290670f23524d47ccddc873ef5673eda4b3c authored by turleyjm on 11 July 2024, 02:09:47 UTC
Update README.md
Update README.md
Tip revision: f6c3290
_writer.py
"""
This module is an example of a barebones writer plugin for napari.
It implements the Writer specification.
see: https://napari.org/stable/plugins/guides.html?#writers
Replace code below according to your needs.
"""
from __future__ import annotations
from typing import TYPE_CHECKING, Any, List, Sequence, Tuple, Union
if TYPE_CHECKING:
DataType = Union[Any, Sequence[Any]]
FullLayerData = Tuple[DataType, dict, str]
def write_single_image(path: str, data: Any, meta: dict) -> List[str]:
"""Writes a single image layer"""
# implement your writer logic here ...
# return path to any file(s) that were successfully written
return [path]
def write_multiple(path: str, data: List[FullLayerData]) -> List[str]:
"""Writes multiple layers of different types."""
# implement your writer logic here ...
# return path to any file(s) that were successfully written
return [path]
