OME-Zarr container API reference¶
Open a container¶
ngio.open_ome_zarr_container
¶
open_ome_zarr_container(
store: StoreOrGroup,
cache: bool = False,
mode: AccessModeLiteral = "r+",
axes_setup: AxesSetup | None = None,
validate_arrays: bool = False,
) -> OmeZarrContainer
Open an OME-Zarr image.
Parameters:
-
store(StoreOrGroup) –The Zarr store or group holding the image.
-
cache(bool, default:False) –Whether to cache the zarr group metadata.
-
mode(AccessModeLiteral, default:'r+') –The access mode for the image.
-
axes_setup(AxesSetup | None, default:None) –Axes setup to load ome-zarr with non-standard axes configurations.
-
validate_arrays(bool, default:False) –Whether to open every level listed in the multiscale metadata up front, so a missing or malformed array fails here rather than on first access.
Source code in src/ngio/images/_ome_zarr_container.py
Create a container¶
ngio.create_empty_ome_zarr
¶
create_empty_ome_zarr(
store: StoreOrGroup,
shape: Sequence[int],
pixelsize: float | tuple[float, float],
z_spacing: float = 1.0,
time_spacing: float = 1.0,
scaling_factors: Sequence[float]
| Literal["auto"] = "auto",
levels: int | list[str] = 5,
translation: Sequence[float] | None = None,
space_unit: SpaceUnits = DefaultSpaceUnit,
time_unit: TimeUnits = DefaultTimeUnit,
axes_names: Sequence[str] | None = None,
channels_meta: Sequence[str | Channel] | None = None,
name: str | None = None,
axes_setup: AxesSetup | None = None,
ngff_version: NgffVersions = DefaultNgffVersion,
chunks: ChunksLike = "auto",
shards: ShardsLike | None = None,
dtype: str = "uint16",
dimension_separator: Literal[".", "/"] = "/",
compressors: CompressorLike = "auto",
extra_array_kwargs: Mapping[str, Any] | None = None,
overwrite: bool = False,
) -> OmeZarrContainer
Create an empty OME-Zarr image with the given shape and metadata.
Parameters:
-
store(StoreOrGroup) –The Zarr store or group to create the image in.
-
shape(Sequence[int]) –The shape of the image.
-
pixelsize(float | tuple[float, float] | None) –The pixel size in x and y dimensions. A value to write, not a lookup key; to select an existing level see
pixel_sizeon the getters. -
z_spacing(float, default:1.0) –The spacing between z slices. Defaults to 1.0.
-
time_spacing(float, default:1.0) –The spacing between time points. Defaults to 1.0.
-
scaling_factors(Sequence[float] | Literal['auto'], default:'auto') –The down-scaling factors for the pyramid levels. Defaults to "auto".
-
levels(int | list[str], default:5) –The number of levels in the pyramid or a list of level names. Defaults to 5.
-
translation(Sequence[float] | None, default:None) –The translation for each axis. at the highest resolution level. Defaults to None.
-
space_unit(SpaceUnits, default:DefaultSpaceUnit) –The unit of space. Defaults to DefaultSpaceUnit.
-
time_unit(TimeUnits, default:DefaultTimeUnit) –The unit of time. Defaults to DefaultTimeUnit.
-
axes_names(Sequence[str] | None, default:None) –The names of the axes. If None the canonical names are used. Defaults to None.
-
channels_meta(Sequence[str | Channel] | None, default:None) –The channels metadata. Defaults to None.
-
name(str | None, default:None) –The name of the image. Defaults to None.
-
axes_setup(AxesSetup | None, default:None) –Axes setup to create ome-zarr with non-standard axes configurations. Defaults to None.
-
ngff_version(NgffVersions, default:DefaultNgffVersion) –The version of the OME-Zarr specification. Defaults to DefaultNgffVersion.
-
chunks(ChunksLike, default:'auto') –The chunk shape. Defaults to "auto".
-
shards(ShardsLike | None, default:None) –The shard shape. Defaults to None.
-
dtype(str, default:'uint16') –The data type of the image. Defaults to "uint16".
-
dimension_separator(Literal['.', '/'], default:'/') –The dimension separator to use. Defaults to "/".
-
compressors(CompressorLike, default:'auto') –The compressor to use. Defaults to "auto".
-
extra_array_kwargs(Mapping[str, Any] | None, default:None) –Extra arguments to pass to the zarr array creation. Defaults to None.
-
overwrite(bool, default:False) –Whether to overwrite an existing image. Defaults to False.
Source code in src/ngio/images/_ome_zarr_container.py
1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 | |
ngio.create_ome_zarr_from_array
¶
create_ome_zarr_from_array(
store: StoreOrGroup,
array: ndarray,
pixelsize: float | tuple[float, float],
z_spacing: float = 1.0,
time_spacing: float = 1.0,
scaling_factors: Sequence[float]
| Literal["auto"] = "auto",
levels: int | list[str] = 5,
translation: Sequence[float] | None = None,
space_unit: SpaceUnits = DefaultSpaceUnit,
time_unit: TimeUnits = DefaultTimeUnit,
axes_names: Sequence[str] | None = None,
channels_meta: Sequence[str | Channel] | None = None,
percentiles: tuple[float, float] = (0.1, 99.9),
name: str | None = None,
axes_setup: AxesSetup | None = None,
ngff_version: NgffVersions = DefaultNgffVersion,
chunks: ChunksLike = "auto",
shards: ShardsLike | None = None,
dimension_separator: Literal[".", "/"] = "/",
compressors: CompressorLike = "auto",
extra_array_kwargs: Mapping[str, Any] | None = None,
overwrite: bool = False,
) -> OmeZarrContainer
Create an OME-Zarr image from a numpy array.
Parameters:
-
store(StoreOrGroup) –The Zarr store or group to create the image in.
-
array(ndarray) –The image data.
-
pixelsize(float | tuple[float, float] | None) –The pixel size in x and y dimensions. A value to write, not a lookup key; to select an existing level see
pixel_sizeon the getters. -
z_spacing(float, default:1.0) –The spacing between z slices. Defaults to 1.0.
-
time_spacing(float, default:1.0) –The spacing between time points. Defaults to 1.0.
-
scaling_factors(Sequence[float] | Literal['auto'], default:'auto') –The down-scaling factors for the pyramid levels. Defaults to "auto".
-
levels(int | list[str], default:5) –The number of levels in the pyramid or a list of level names. Defaults to 5.
-
translation(Sequence[float] | None, default:None) –The translation for each axis. at the highest resolution level. Defaults to None.
-
space_unit(SpaceUnits, default:DefaultSpaceUnit) –The unit of space. Defaults to DefaultSpaceUnit.
-
time_unit(TimeUnits, default:DefaultTimeUnit) –The unit of time. Defaults to DefaultTimeUnit.
-
axes_names(Sequence[str] | None, default:None) –The names of the axes. If None the canonical names are used. Defaults to None.
-
channels_meta(Sequence[str | Channel] | None, default:None) –The channels metadata. Defaults to None.
-
percentiles(tuple[float, float], default:(0.1, 99.9)) –The percentiles of the channels for computing display ranges. Defaults to (0.1, 99.9).
-
name(str | None, default:None) –The name of the image. Defaults to None.
-
axes_setup(AxesSetup | None, default:None) –Axes setup to create ome-zarr with non-standard axes configurations. Defaults to None.
-
ngff_version(NgffVersions, default:DefaultNgffVersion) –The version of the OME-Zarr specification. Defaults to DefaultNgffVersion.
-
chunks(ChunksLike, default:'auto') –The chunk shape. Defaults to "auto".
-
shards(ShardsLike | None, default:None) –The shard shape. Defaults to None.
-
dimension_separator(Literal['.', '/'], default:'/') –The separator to use for dimensions. Defaults to "/".
-
compressors(CompressorLike, default:'auto') –The compressors to use. Defaults to "auto".
-
extra_array_kwargs(Mapping[str, Any] | None, default:None) –Extra arguments to pass to the zarr array creation. Defaults to None.
-
overwrite(bool, default:False) –Whether to overwrite an existing image. Defaults to False.
Source code in src/ngio/images/_ome_zarr_container.py
1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 | |
OmeZarrContainer¶
ngio.OmeZarrContainer
¶
OmeZarrContainer(
group_handler: ZarrGroupHandler,
table_container: TablesContainer | None = None,
label_container: LabelsContainer | None = None,
axes_setup: AxesSetup | None = None,
validate_arrays: bool = False,
)
This class is an object representation of an OME-Zarr image.
It provides methods to access
- The multiscale image metadata
- To open images at different levels of resolution
- To access labels and tables associated with the image.
- To derive new images, labels, and add tables to the image.
- To modify the image metadata, such as axes units and channel metadata.
Attributes:
-
images_container(ImagesContainer) –The container for the images.
-
labels_container(LabelsContainer) –The container for the labels.
-
tables_container(TablesContainer) –The container for the tables.
Initialize the OmeZarrContainer.
Parameters:
-
group_handler(ZarrGroupHandler) –The Zarr group handler.
-
table_container(TablesContainer | None, default:None) –The tables container.
-
label_container(LabelsContainer | None, default:None) –The labels container.
-
axes_setup(AxesSetup | None, default:None) –Axes setup to load ome-zarr with non-standard axes configurations.
-
validate_arrays(bool, default:False) –Whether to open every level listed in the multiscale metadata, so a missing or malformed array fails here rather than on first access.
Source code in src/ngio/images/_ome_zarr_container.py
images_container
property
¶
images_container: ImagesContainer
wavelength_ids
property
¶
Return the list of wavelength of the image.
get_channel_idx
¶
Get the index of a channel by its label or wavelength ID.
Source code in src/ngio/images/_ome_zarr_container.py
set_channel_meta
¶
Set the channels metadata.
Parameters:
-
channel_meta(ChannelsMeta | None, default:None) –The channels metadata to set. If
None, a default metadata is created from the number of channels in the image.
Source code in src/ngio/images/_ome_zarr_container.py
set_channel_labels
¶
Update the labels of the channels.
Parameters:
-
labels(Sequence[str]) –The new labels for the channels.
Source code in src/ngio/images/_ome_zarr_container.py
set_channel_colors
¶
Update the colors of the channels.
Parameters:
-
colors(Sequence[str]) –The new colors for the channels.
Source code in src/ngio/images/_ome_zarr_container.py
set_channel_windows
¶
set_channel_windows(
starts_ends: Sequence[tuple[float, float]],
min_max: Sequence[tuple[float, float]] | None = None,
) -> None
Update the channel windows.
These values are used by viewers to set the display range of each channel.
Parameters:
-
starts_ends(Sequence[tuple[float, float]]) –The start and end values for each channel.
-
min_max(Sequence[tuple[float, float]] | None, default:None) –The min and max values for each channel. If None, the min and max values will not be updated.
Source code in src/ngio/images/_ome_zarr_container.py
set_channel_windows_with_percentiles
¶
set_channel_windows_with_percentiles(
percentiles: tuple[float, float]
| list[tuple[float, float]] = (0.1, 99.9),
) -> None
Update the channel windows using percentiles.
Parameters:
-
percentiles(tuple[float, float] | list[tuple[float, float]], default:(0.1, 99.9)) –The start and end percentiles for each channel. If a single tuple is provided, the same percentiles will be used for all channels.
Source code in src/ngio/images/_ome_zarr_container.py
set_axes_units
¶
set_axes_units(
space_unit: SpaceUnits = DefaultSpaceUnit,
time_unit: TimeUnits = DefaultTimeUnit,
set_labels: bool = True,
) -> None
Set the space and time units of the image axes.
Parameters:
-
space_unit(SpaceUnits, default:DefaultSpaceUnit) –The unit of space.
-
time_unit(TimeUnits, default:DefaultTimeUnit) –The unit of time.
-
set_labels(bool, default:True) –Whether to set the units for the labels as well.
Source code in src/ngio/images/_ome_zarr_container.py
set_axes_names
¶
Set the axes names of the image.
Parameters:
-
axes_names(Sequence[str]) –The axes names of the image.
Source code in src/ngio/images/_ome_zarr_container.py
set_name
¶
Set the name of the image in the metadata.
This does not change the group name or any paths.
Parameters:
-
name(str) –The name of the image.
Source code in src/ngio/images/_ome_zarr_container.py
get_image
¶
get_image(
path: str | None = None,
pixel_size: PixelSize | None = None,
strict: bool = False,
) -> Image
Get an image at a specific level.
Parameters:
-
path(str | None, default:None) –The path to the image in the ome_zarr file.
-
pixel_size(PixelSize | None, default:None) –Select the pyramid level whose pixel size matches this one. A lookup key, not a value to write; to set a pixel size see
pixelsizeon the create/derive entry points. -
strict(bool, default:False) –Only used if the pixel size is provided. If True, the pixel size must match the image pixel size exactly. If False, the closest pixel size level will be returned.
Source code in src/ngio/images/_ome_zarr_container.py
get_masked_image
¶
get_masked_image(
masking_label_name: str | None = None,
masking_table_name: str | None = None,
path: str | None = None,
pixel_size: PixelSize | None = None,
strict: bool = False,
) -> MaskedImage
Get a masked image at a specific level.
Parameters:
-
masking_label_name(str | None, default:None) –The name of the masking label to use. If None, the masking table must be provided.
-
masking_table_name(str | None, default:None) –The name of the masking table to use. If None, the masking label must be provided.
-
path(str | None, default:None) –The path to the image in the ome_zarr file. If None, the first level will be used.
-
pixel_size(PixelSize | None, default:None) –Select the pyramid level whose pixel size matches this one. A lookup key, not a value to write; to set a pixel size see
pixelsizeon the create/derive entry points. This is only used if path is None. -
strict(bool, default:False) –Only used if the pixel size is provided. If True, the pixel size must match the image pixel size exactly. If False, the closest pixel size level will be returned.
Source code in src/ngio/images/_ome_zarr_container.py
derive_image
¶
derive_image(
store: StoreOrGroup,
ref_path: str | None = None,
shape: Sequence[int] | None = None,
pixelsize: float | tuple[float, float] | None = None,
z_spacing: float | None = None,
time_spacing: float | None = None,
name: str | None = None,
translation: Sequence[float] | None = None,
channels_policy: Literal["squeeze", "same", "singleton"]
| int = "same",
channels_meta: Sequence[str | Channel] | None = None,
ngff_version: NgffVersions | None = None,
chunks: ChunksLike | None = None,
shards: ShardsLike | None = None,
dtype: str | None = None,
dimension_separator: Literal[".", "/"] | None = None,
compressors: CompressorLike | None = None,
extra_array_kwargs: Mapping[str, Any] | None = None,
overwrite: bool = False,
copy_labels: bool = False,
copy_tables: bool = False,
) -> OmeZarrContainer
Derive a new OME-Zarr container from the current image.
If a kwarg is not provided, the value from the reference image will be used.
Parameters:
-
store(StoreOrGroup) –The Zarr store or group to create the image in.
-
ref_path(str | None, default:None) –The path to the reference image in the image container.
-
shape(Sequence[int] | None, default:None) –The shape of the new image.
-
pixelsize(float | tuple[float, float] | None, default:None) –The pixel size of the new image. A value to write, not a lookup key; to select an existing level see
pixel_sizeon the getters. -
z_spacing(float | None, default:None) –The z spacing of the new image.
-
time_spacing(float | None, default:None) –The time spacing of the new image.
-
name(str | None, default:None) –The name of the new image.
-
translation(Sequence[float] | None, default:None) –The translation for each axis at the highest resolution level. Defaults to None.
-
channels_policy(Literal['squeeze', 'same', 'singleton'] | int, default:'same') –Possible policies: - If "squeeze", the channels axis will be removed (no matter its size). - If "same", the channels axis will be kept as is (if it exists). - If "singleton", the channels axis will be set to size 1. - If an integer is provided, the channels axis will be changed to have that size.
-
channels_meta(Sequence[str | Channel] | None, default:None) –The channels metadata of the new image.
-
ngff_version(NgffVersions | None, default:None) –The NGFF version to use.
-
chunks(ChunksLike | None, default:None) –The chunk shape of the new image.
-
shards(ShardsLike | None, default:None) –The shard shape of the new image.
-
dtype(str | None, default:None) –The data type of the new image.
-
dimension_separator(Literal['.', '/'] | None, default:None) –The separator to use for dimensions.
-
compressors(CompressorLike | None, default:None) –The compressors to use.
-
extra_array_kwargs(Mapping[str, Any] | None, default:None) –Extra arguments to pass to the zarr array creation.
-
overwrite(bool, default:False) –Whether to overwrite an existing image. Defaults to False.
-
copy_labels(bool, default:False) –Whether to copy the labels from the current image. Defaults to False.
-
copy_tables(bool, default:False) –Whether to copy the tables from the current image. Defaults to False.
Returns:
-
OmeZarrContainer(OmeZarrContainer) –The new derived OME-Zarr container.
Source code in src/ngio/images/_ome_zarr_container.py
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 | |
list_tables
¶
list_tables(
filter_types: TypedTable | str | None = None,
) -> list[str]
List all tables in the image.
Source code in src/ngio/images/_ome_zarr_container.py
list_roi_tables
¶
List all ROI tables in the image.
Returns [] when the image has no tables, matching list_tables.
Source code in src/ngio/images/_ome_zarr_container.py
get_roi_table
¶
get_roi_table(name: str) -> RoiTable
Get a ROI table from the image.
Parameters:
-
name(str) –The name of the table.
Source code in src/ngio/images/_ome_zarr_container.py
get_masking_roi_table
¶
get_masking_roi_table(name: str) -> MaskingRoiTable
Get a masking ROI table from the image.
Parameters:
-
name(str) –The name of the table.
Source code in src/ngio/images/_ome_zarr_container.py
get_feature_table
¶
get_feature_table(name: str) -> FeatureTable
Get a feature table from the image.
Parameters:
-
name(str) –The name of the table.
Source code in src/ngio/images/_ome_zarr_container.py
get_generic_roi_table
¶
get_generic_roi_table(name: str) -> GenericRoiTable
Get a generic ROI table from the image.
Parameters:
-
name(str) –The name of the table.
Source code in src/ngio/images/_ome_zarr_container.py
get_condition_table
¶
get_condition_table(name: str) -> ConditionTable
Get a condition table from the image.
Parameters:
-
name(str) –The name of the table.
Source code in src/ngio/images/_ome_zarr_container.py
get_table
¶
get_table(name: str) -> Table
Get a table from the image.
Parameters:
-
name(str) –The name of the table.
get_table_as
¶
get_table_as(
name: str,
table_cls: type[TableType],
backend: TableBackend | None = None,
) -> TableType
Get a table from the image as a specific type.
Parameters:
-
name(str) –The name of the table.
-
table_cls(type[TableType]) –The type of the table.
-
backend(TableBackend | None, default:None) –The backend to use. If None, the default backend is used.
Source code in src/ngio/images/_ome_zarr_container.py
build_masking_roi_table
¶
build_masking_roi_table(label: str) -> MaskingRoiTable
add_table
¶
add_table(
name: str,
table: Table,
backend: TableBackend | None = None,
overwrite: bool = False,
) -> None
Add a table to the image.
If backend is None (default), the table's own backend is preserved.
Source code in src/ngio/images/_ome_zarr_container.py
delete_table
¶
Delete a table from the group.
Parameters:
-
name(str) –The name of the table to delete.
-
missing_ok(bool, default:False) –If True, do not raise an error if the table does not exist.
Source code in src/ngio/images/_ome_zarr_container.py
list_labels
¶
List all labels in the image.
get_label
¶
get_label(
name: str,
path: str | None = None,
pixel_size: PixelSize | None = None,
strict: bool = False,
) -> Label
Get a label from the group.
Parameters:
-
name(str) –The name of the label.
-
path(str | None, default:None) –The path to the image in the ome_zarr file.
-
pixel_size(PixelSize | None, default:None) –Select the pyramid level whose pixel size matches this one. A lookup key, not a value to write; to set a pixel size see
pixelsizeon the create/derive entry points. -
strict(bool, default:False) –Only used if the pixel size is provided. If True, the pixel size must match the image pixel size exactly. If False, the closest pixel size level will be returned.
Source code in src/ngio/images/_ome_zarr_container.py
get_masked_label
¶
get_masked_label(
label_name: str,
masking_label_name: str | None = None,
masking_table_name: str | None = None,
path: str | None = None,
pixel_size: PixelSize | None = None,
strict: bool = False,
) -> MaskedLabel
Get a masked image at a specific level.
Parameters:
-
label_name(str) –The name of the label.
-
masking_label_name(str | None, default:None) –The name of the masking label.
-
masking_table_name(str | None, default:None) –The name of the masking table.
-
path(str | None, default:None) –The path to the image in the ome_zarr file.
-
pixel_size(PixelSize | None, default:None) –Select the pyramid level whose pixel size matches this one. A lookup key, not a value to write; to set a pixel size see
pixelsizeon the create/derive entry points. -
strict(bool, default:False) –Only used if the pixel size is provided. If True, the pixel size must match the image pixel size exactly. If False, the closest pixel size level will be returned.
Source code in src/ngio/images/_ome_zarr_container.py
delete_label
¶
Delete a label from the group.
Parameters:
-
name(str) –The name of the label to delete.
-
missing_ok(bool, default:False) –If True, do not raise an error if the label does not exist.
Source code in src/ngio/images/_ome_zarr_container.py
derive_label
¶
derive_label(
name: str,
ref_image: Image | Label | None = None,
shape: Sequence[int] | None = None,
pixelsize: float | tuple[float, float] | None = None,
z_spacing: float | None = None,
time_spacing: float | None = None,
translation: Sequence[float] | None = None,
channels_policy: Literal["same", "squeeze", "singleton"]
| int = "squeeze",
ngff_version: NgffVersions | None = None,
chunks: ChunksLike | None = None,
shards: ShardsLike | None = None,
dtype: str | None = None,
dimension_separator: Literal[".", "/"] | None = None,
compressors: CompressorLike | None = None,
extra_array_kwargs: Mapping[str, Any] | None = None,
overwrite: bool = False,
) -> Label
Derive a new label from an existing image or label.
If a kwarg is not provided, the value from the reference image will be used.
Parameters:
-
name(str) –The name of the new label.
-
ref_image(Image | Label | None, default:None) –The reference image to derive the new label from. If None, the first level image will be used.
-
shape(Sequence[int] | None, default:None) –The shape of the new label.
-
pixelsize(float | tuple[float, float] | None, default:None) –The pixel size of the new label. A value to write, not a lookup key; to select an existing level see
pixel_sizeon the getters. -
z_spacing(float | None, default:None) –The z spacing of the new label.
-
time_spacing(float | None, default:None) –The time spacing of the new label.
-
translation(Sequence[float] | None, default:None) –The translation for each axis at the highest resolution level. Defaults to None.
-
channels_policy(Literal['same', 'squeeze', 'singleton'] | int, default:'squeeze') –Possible policies: - If "squeeze", the channels axis will be removed (no matter its size). - If "same", the channels axis will be kept as is (if it exists). - If "singleton", the channels axis will be set to size 1. - If an integer is provided, the channels axis will be changed to have that size. Defaults to "squeeze".
-
ngff_version(NgffVersions | None, default:None) –The NGFF version to use.
-
chunks(ChunksLike | None, default:None) –The chunk shape of the new label.
-
shards(ShardsLike | None, default:None) –The shard shape of the new label.
-
dtype(str | None, default:None) –The data type of the new label.
-
dimension_separator(Literal['.', '/'] | None, default:None) –The separator to use for dimensions.
-
compressors(CompressorLike | None, default:None) –The compressors to use.
-
extra_array_kwargs(Mapping[str, Any] | None, default:None) –Extra arguments to pass to the zarr array creation.
-
overwrite(bool, default:False) –Whether to overwrite an existing label. Defaults to False.
Returns:
-
Label(Label) –The new derived label.
Source code in src/ngio/images/_ome_zarr_container.py
864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 | |