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
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 | |
get_suffix
¤
get_suffix(source: Union[ZipPath, FileSource]) -> Suffix
Deprecated
use source.suffix instead.
Source code in src/bioimageio/core/io.py
205 206 207 | |
load_dataset_stat
¤
load_dataset_stat(path: Path)
Source code in src/bioimageio/core/io.py
171 172 173 | |
load_image
¤
load_image(source: Union[ZipPath, PermissiveFileSource], is_volume: Optional[bool] = None) -> NDArray[Any]
load a single image as numpy array
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
Union[ZipPath, PermissiveFileSource]
|
image source |
required |
|
Optional[bool]
|
deprecated |
None
|
Source code in src/bioimageio/core/io.py
39 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 | |
load_tensor
¤
Source code in src/bioimageio/core/io.py
71 72 73 74 75 76 77 | |
save_dataset_stat
¤
save_dataset_stat(stat: Mapping[DatasetMeasure, MeasureValue], path: Path)
Source code in src/bioimageio/core/io.py
164 165 166 167 168 | |
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
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | |
save_tensor
¤
save_tensor(path: Union[Path, str], tensor: Tensor) -> None
Source code in src/bioimageio/core/io.py
85 86 87 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 | |