Skip to content
Snippets Groups Projects
Commit 371b0515 authored by Hugo chauvet's avatar Hugo chauvet
Browse files

add a bad_value to fuse function to handle float array

parent ff6ad532
No related branches found
No related tags found
No related merge requests found
......@@ -163,7 +163,8 @@ def fuse_func(
chunk_shape = block_info[None]["chunk-shape"]
tiles_info = input_tile_info[anchor_point]
# print(f"Processing chunk at {anchor_point}")
fused = np.zeros(chunk_shape, dtype=data_dtype)
bad_value = 200000
fused = np.zeros(chunk_shape, dtype=data_dtype) - bad_value
# print(tiles_info)
shift = AffineTransform(translation=(-anchor_point[0], -anchor_point[1]))
for image_representation, tile_affine in tiles_info:
......@@ -187,6 +188,8 @@ def fuse_func(
# may want to use one of the skimage.img_as_* functions instead
stack = np.stack([fused, tile_shifted])
fused = np.max(stack, axis=0)
fused[fused == bad_value] = 0
return fused
......
......@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "DITB"
version = "20240525rc2"
version = "20240525rc3"
readme = "README.md"
requires-python = ">=3.11"
authors = [{ name = "Hugo Chauvet", email = "hugo.chauvet@synchrotron-soleil.fr" }]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment