Skip to content

Commit

Permalink
Fix upscaling in image_labeling_whole_well (ref #104)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcompa committed Jul 15, 2022
1 parent 1e9e570 commit 873e854
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion fractal/tasks/image_labeling_whole_well.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,17 @@ def image_labeling_whole_well(
)

# Explicit on-disk upscaling
# (https://stackoverflow.com/questions/7525214/how-to-scale-a-numpy-array)
# FIXME: what about memory usage?
upscaled_mask = np.kron(
mask, np.ones((1, coarsening_xy, coarsening_xy))
mask,
np.ones(
(
1,
coarsening_xy**labeling_level,
coarsening_xy**labeling_level,
)
),
).astype(mask.dtype)
with open("LOG_image_labeling_whole_well", "a") as out:
out.write(
Expand Down

0 comments on commit 873e854

Please sign in to comment.