io
¤
Functions:
| Name | Description |
|---|---|
ensure_unzipped |
unzip a (downloaded) source to a file in folder if source is a zip archive |
get_suffix |
Deprecated use source.suffix instead. |
load_dataset_stat |
|
load_image |
load a single image as numpy array |
load_tensor |
|
save_dataset_stat |
|
save_sample |
Save a sample to a path pattern |
save_tensor |
|
Attributes:
| Name | Type | Description |
|---|---|---|
Suffix |
|
ensure_unzipped
¤
ensure_unzipped(source: Union[PermissiveFileSource, ZipPath, BytesReader], folder: Path)
unzip a (downloaded) source to a file in folder if source is a zip archive otherwise copy source to a file in folder.
Source code in src/bioimageio/core/io.py
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | |
get_suffix
¤
get_suffix(source: Union[ZipPath, FileSource]) -> Suffix
Deprecated
use source.suffix instead.
Source code in src/bioimageio/core/io.py
208 209 210 | |
load_dataset_stat
¤
load_dataset_stat(path: Path)
Source code in src/bioimageio/core/io.py
174 175 176 | |
load_image
¤
load_image(source: Union[PermissiveFileSource, ZipPath], is_volume: Optional[bool] = None) -> NDArray[Any]
load a single image as numpy array
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Union[PermissiveFileSource, ZipPath]
|
image source |
required |
|
Optional[bool]
|
deprecated |
None
|
Source code in src/bioimageio/core/io.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | |
load_tensor
¤
load_tensor(source: Union[PermissiveFileSource, ZipPath], /, axes: Optional[Sequence[AxisLike]] = None) -> Tensor
Source code in src/bioimageio/core/io.py
72 73 74 75 76 77 78 79 80 | |
save_dataset_stat
¤
save_dataset_stat(stat: Mapping[DatasetMeasure, MeasureValue], path: Path)
Source code in src/bioimageio/core/io.py
167 168 169 170 171 | |
save_sample
¤
Save a sample to a path pattern or all sample members in the path mapping.
If path is a pathlib.Path or a string and the sample has multiple members,
path it must contain {member_id} (or {input_id} or {output_id}).
(Each) path may contain {sample_id} to be formatted with the sample object.
Source code in src/bioimageio/core/io.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 | |
save_tensor
¤
save_tensor(path: Union[Path, str], tensor: Tensor) -> None
Source code in src/bioimageio/core/io.py
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | |