From f58eb70ace7bd88ad41b7953cd7335b8eeff583a Mon Sep 17 00:00:00 2001 From: Bradley Lowekamp Date: Mon, 10 Jun 2024 10:55:56 -0400 Subject: [PATCH] Replace meanstd with float 1 for 16-bit TIFF When float 1 is used in conjuction with shrink, the range is computed after the anti-aliasing and downsamping is performed. The resampling supresses the outliers ( pixel stuck on ), from overly effecting the results. The meanstd intensity normalization produce poor results for bimodal images, where the blacks were too bright. --- em_workflows/dm_conversion/flow.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/em_workflows/dm_conversion/flow.py b/em_workflows/dm_conversion/flow.py index c8b76ce2..fa2446e8 100644 --- a/em_workflows/dm_conversion/flow.py +++ b/em_workflows/dm_conversion/flow.py @@ -85,8 +85,9 @@ def convert_if_int16_tiff(file_path: FilePath) -> None: "6", "-mode", "0", - "-meansd", - "140,50", + # From the newstack manual for "-float": Enter 1 for each section to fill the data range. + "-float", + "1", file_path.fp_in.as_posix(), str(tif_8_bit), ]