Skip to content

Commit eff8793

Browse files
authored
Chunk shape (#706)
* WIP * WIP * format * re-add upath stub * format * pr feedback
1 parent 60fd31b commit eff8793

27 files changed

+344
-234
lines changed

webknossos/Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ For upgrade instructions, please check the respective *Breaking Changes* section
1313
[Commits](https://github.com/scalableminds/webknossos-libs/compare/v0.10.12...HEAD)
1414

1515
### Breaking Changes
16+
- Renamed `chunk_size` arguments to `chunk_shape`. `chunk_size` is still available as keyword-only argument, but deprecated. [#706](https://github.com/scalableminds/webknossos-libs/pull/706)
1617

1718
### Added
1819

webknossos/examples/dataset_usage.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def main() -> None:
6161

6262
copy_of_dataset = dataset.copy_dataset(
6363
"testoutput/copy_of_dataset",
64-
chunk_size=8,
64+
chunk_shape=8,
6565
chunks_per_shard=8,
6666
compress=True,
6767
)

webknossos/script_collection/globalize_floodfill.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def execute_floodfill(
111111
source_id: int,
112112
target_id: int,
113113
) -> None:
114-
cube_size = data_mag.info.shard_size
114+
cube_size = data_mag.info.shard_shape
115115
cube_bbox = BoundingBox(Vec3Int(0, 0, 0), cube_size)
116116
chunk_with_relative_seed: List[Tuple[Vec3Int, Vec3Int]] = [
117117
get_chunk_pos_and_offset(seed_position, cube_size)
@@ -266,7 +266,7 @@ def merge_with_fallback_layer(
266266
]
267267
output_mag = output_layer.get_mag(input_segmentation_mag.mag)
268268

269-
cube_size = output_mag.info.chunk_size[0] * output_mag.info.chunks_per_shard[0]
269+
cube_size = output_mag.info.chunk_shape[0] * output_mag.info.chunks_per_shard[0]
270270
chunks_with_bboxes = BoundingBox.group_boxes_with_aligned_mag(
271271
bboxes, Mag(cube_size)
272272
)

0 commit comments

Comments
 (0)