Skip to content

Commit 020728f

Browse files
authored
Fix passing chunk_shape when converting non-mag1 knossos datasets (#857)
* Fix passing chunk_shape when converting non-mag1 knossos datasets * changelog * format
1 parent d3bedf7 commit 020728f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

wkcuber/Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ For upgrade instructions, please check the respective *Breaking Changes* section
1616
### Changed
1717

1818
### Fixed
19+
- Fixed a bug where converting coarse-mag Knossos data would crash with an assertion error. [#857](https://github.com/scalableminds/webknossos-libs/pull/857)
1920

2021

2122
## [0.11.2](https://github.com/scalableminds/webknossos-libs/releases/tag/v0.11.2) - 2023-01-18

wkcuber/wkcuber/convert_knossos.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def convert_knossos(
9898
dtype: str,
9999
voxel_size: Tuple[float, float, float],
100100
data_format: DataFormat,
101-
chunk_shape: Vec3Int,
101+
chunk_shape: Vec3Int, # in target-mag
102102
chunks_per_shard: Vec3Int,
103103
mag: int = 1,
104104
args: Optional[Namespace] = None,
@@ -134,7 +134,7 @@ def convert_knossos(
134134
with get_executor_for_args(args) as executor:
135135
target_mag.for_each_chunk(
136136
partial(convert_cube_job, source_knossos_info),
137-
chunk_shape=chunk_shape * chunks_per_shard,
137+
chunk_shape=chunk_shape * mag * chunks_per_shard,
138138
executor=executor,
139139
progress_desc=f"Converting knossos layer {layer_name}",
140140
)

0 commit comments

Comments
 (0)