| 1 | from typing import Any, Dict, List, Optional, Union |
| 2 | |
| 3 | import numpy as np |
| 4 | |
| 5 | from ..typing import ArrayLike |
| 6 | from . import Array |
| 7 | from .request import Request |
| 8 | from ..config import PluginConfig |
| 9 | |
| 10 | def _get_config(plugin: str) -> PluginConfig: ... |
| 11 | |
| 12 | class Format(object): |
| 13 | @property |
| 14 | def doc(self) -> str: ... |
| 15 | @property |
| 16 | def name(self) -> str: ... |
| 17 | @property |
| 18 | def description(self) -> str: ... |
| 19 | @property |
| 20 | def extensions(self) -> List[str]: ... |
| 21 | @property |
| 22 | def modes(self) -> str: ... |
| 23 | def __init__( |
| 24 | self, |
| 25 | name: str, |
| 26 | description: str, |
| 27 | extensions: Union[str, list, tuple, None] = None, |
| 28 | modes: str = None, |
| 29 | ) -> None: ... |
| 30 | def __repr__(self) -> str: ... |
| 31 | def __str__(self) -> str: ... |
| 32 | def get_reader(self, request: Request) -> Reader: ... |
| 33 | def get_writer(self, request: Request) -> Writer: ... |
| 34 | def can_read(self, request: Request) -> bool: ... |
| 35 | def can_write(self, request: Request) -> bool: ... |
| 36 | def _can_read(self, request: Request) -> bool: ... |
| 37 | def _can_write(self, request: Request) -> bool: ... |
| 38 | |
| 39 | class _BaseReaderWriter(object): |
| 40 | @property |
| 41 | def format(self) -> Format: ... |
| 42 | @property |
| 43 | def request(self) -> Request: ... |
| 44 | @property |
| 45 | def closed(self) -> bool: ... |
| 46 | def __init__(self, format: Format, request: Request) -> None: ... |
| 47 | def __enter__(self) -> Format._BaseReaderWriter: ... |
| 48 | def __exit__(self, type, value, traceback) -> None: ... |
| 49 | def __del__(self) -> None: ... |
| 50 | def close(self) -> None: ... |
| 51 | def _checkClosed(self, msg=None) -> None: ... |
| 52 | def _open(self, **kwargs) -> None: ... |
| 53 | def _close(self) -> None: ... |
| 54 | |
| 55 | class Reader(_BaseReaderWriter): |
| 56 | def get_length(self) -> int: ... |
| 57 | def get_data(self, index: int, **kwargs) -> Array: ... |
| 58 | def get_next_data(self, **kwargs) -> Dict[str, Any]: ... |
| 59 | def set_image_index(self, index: int, **kwargs) -> None: ... |
| 60 | def get_meta_data(self, index: int = None) -> Dict[str, Any]: ... |
| 61 | def iter_data(self) -> Array: ... |
| 62 | def __iter__(self) -> Array: ... |
| 63 | def __len__(self) -> int: ... |
| 64 | def _get_length(self) -> int: ... |
| 65 | def _get_data(self, index: int) -> Array: ... |
| 66 | def _get_meta_data(self, index: int) -> Dict[str, Any]: ... |
| 67 | |
| 68 | class Writer(_BaseReaderWriter): |
| 69 | def append_data(self, im: ArrayLike, meta: Dict[str, Any] = None) -> None: ... |
| 70 | def set_meta_data(self, meta: Dict[str, Any]) -> None: ... |
| 71 | def _append_data(self, im: ArrayLike, meta: Dict[str, Any]) -> None: ... |
| 72 | def _set_meta_data(self, meta: Dict[str, Any]) -> None: ... |
| 73 | |
| 74 | class FormatManager(object): |
| 75 | @property |
| 76 | def _formats(self) -> List[Format]: ... |
| 77 | def __repr__(self) -> str: ... |
| 78 | def __iter__(self) -> Format: ... |
| 79 | def __len__(self) -> int: ... |
| 80 | def __str__(self) -> str: ... |
| 81 | def __getitem__(self, name: str) -> Format: ... |
| 82 | def sort(self, *names: str) -> None: ... |
| 83 | def add_format(self, iio_format: Format, overwrite: bool = False) -> None: ... |
| 84 | def search_read_format(self, request: Request) -> Optional[Format]: ... |
| 85 | def search_write_format(self, request: Request) -> Optional[Format]: ... |
| 86 | def get_format_names(self) -> List[str]: ... |
| 87 | def show(self) -> None: ... |