From 7a4d7be9617de877e7a2a6eaa4d30a37cb1af298 Mon Sep 17 00:00:00 2001 From: Jordao Bragantini Date: Sun, 8 Jan 2023 22:02:38 -0800 Subject: [PATCH] improv CTC solution compression --- ultrack/core/export/ctc.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ultrack/core/export/ctc.py b/ultrack/core/export/ctc.py index 70281fc..3d4bb58 100644 --- a/ultrack/core/export/ctc.py +++ b/ultrack/core/export/ctc.py @@ -282,6 +282,9 @@ def _write_tiff_buffer( dilated = grey_dilation(buffer, footprint=footprint) np.putmask(buffer, buffer == 0, dilated) + # reducing mask sizes + buffer = buffer.astype(np.min_scalar_type(buffer.max())) + imwrite(output_dir / f"mask{t:03}.tif", buffer)