You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I saw the bug here, and started to wonder if we want the functionals/API to take just tuple[float, float, float] or VoxelSize. I wouldn't want to create a VoxelSize first if I know PlantSeg and just want to use the functions.
def_image_postprocessing(image: PlantSegImage, scale_to_origin: bool, export_dtype) ->PlantSegImage:
ifscale_to_originandimage.requires_scaling:
data=dp.scale_image_to_voxelsize(
image.get_data(),
input_voxel_size=image.voxel_size, # <-- here image.voxel_size is a VoxelSize but input_voxel_size wants tupleoutput_voxel_size=image.original_voxel_size, # same hereorder=image.interpolation_order(),
)
new_voxel_size=image.original_voxel_size
PS: if we decide to let functionals take vallina-typed inputs, then I fix this by adding a .to_tuple() to VoxelSize or rename VoxelSize.voxels_size to VoxelSize.value. So we access image.voxel_size.value or image.voxel_size.to_tuple().
The text was updated successfully, but these errors were encountered:
I think we should write a new functional that also takes the layout as input (like in the current image_rescale_to_voxel_size_task). I agree that the function will only need to know about the tuple.
I saw the bug here, and started to wonder if we want the functionals/API to take just
tuple[float, float, float]
orVoxelSize
. I wouldn't want to create aVoxelSize
first if I know PlantSeg and just want to use the functions.PS: if we decide to let functionals take vallina-typed inputs, then I fix this by adding a
.to_tuple()
toVoxelSize
or renameVoxelSize.voxels_size
toVoxelSize.value
. So we accessimage.voxel_size.value
orimage.voxel_size.to_tuple()
.The text was updated successfully, but these errors were encountered: