@@ -492,7 +492,7 @@ def cleanup(dir: str, mode: str, suffix: str):
492
492
type = click .INT , default = 0 ,
493
493
help = 'maximum mip level.' )
494
494
@operator
495
- def create_info (tasks ,input_chunk_name : str , volume_path : str , channel_num : int ,
495
+ def create_info (tasks , input_chunk_name : str , volume_path : str , channel_num : int ,
496
496
layer_type : str , data_type : str , encoding : str , voxel_size : tuple ,
497
497
voxel_offset : tuple , volume_size : tuple , block_size : tuple , factor : tuple , max_mip : int ):
498
498
"""Create attrsdata for Neuroglancer Precomputed volume."""
@@ -506,8 +506,10 @@ def create_info(tasks,input_chunk_name: str, volume_path: str, channel_num: int,
506
506
chunk = task [input_chunk_name ]
507
507
if chunk .ndim == 3 :
508
508
channel_num = 1
509
+ volume_size = chunk .shape
509
510
elif chunk .ndim == 4 :
510
511
channel_num = chunk .shape [0 ]
512
+ volume_size = chunk .shape [1 :]
511
513
else :
512
514
raise ValueError ('chunk dimension can only be 3 or 4' )
513
515
@@ -516,7 +518,6 @@ def create_info(tasks,input_chunk_name: str, volume_path: str, channel_num: int,
516
518
if voxel_size is None :
517
519
voxel_size = chunk .voxel_size
518
520
519
- volume_size = chunk .shape
520
521
data_type = chunk .dtype .name
521
522
522
523
if layer_type is None :
0 commit comments