Skip to content

Commit ff1d416

Browse files
committed
bugfix: support setting pixel size of 2d layers
1 parent 4800b9c commit ff1d416

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

napari_pyclesperanto_assistant/_convert_to_numpy.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def split_stack(image : Image, napari_viewer : Viewer, axis : int = 0):
8282

8383
@register_function(menu="Utilities > Set voxel size")
8484
def set_voxel_size(image : LayerInput, voxel_width : float = 1, voxel_height : float = 1, voxel_depth : float = 1):
85-
image.scale = [voxel_depth, voxel_height, voxel_width]
85+
image.scale = [voxel_depth, voxel_height, voxel_width][-len(image.scale):]
8686

8787

8888
@register_function(menu="Utilities > Set voxel size of all layers")

0 commit comments

Comments
 (0)