From fe4521d298d61454017ea0cef66c374ef317466e Mon Sep 17 00:00:00 2001 From: Nodar Gogoberidze Date: Tue, 19 Nov 2024 13:09:57 -0500 Subject: [PATCH] Add TODOs --- .../cellprofiler_core/constants/modules/namesandtypes.py | 1 + .../image/abstract_image/file/_file_image.py | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/subpackages/core/cellprofiler_core/constants/modules/namesandtypes.py b/src/subpackages/core/cellprofiler_core/constants/modules/namesandtypes.py index 1e298f35ac..d26454ab56 100644 --- a/src/subpackages/core/cellprofiler_core/constants/modules/namesandtypes.py +++ b/src/subpackages/core/cellprofiler_core/constants/modules/namesandtypes.py @@ -27,6 +27,7 @@ ] MANUAL_INTENSITY_LABEL = "Maximum intensity" +# TODO - 4955: Revise help text for NamesAndTypes RESCALING_HELP_TEXT = """\ This option determines how the image intensity should be rescaled from 0.0 – 1.0. diff --git a/src/subpackages/core/cellprofiler_core/image/abstract_image/file/_file_image.py b/src/subpackages/core/cellprofiler_core/image/abstract_image/file/_file_image.py index df2ff1db3b..9e7d18e286 100644 --- a/src/subpackages/core/cellprofiler_core/image/abstract_image/file/_file_image.py +++ b/src/subpackages/core/cellprofiler_core/image/abstract_image/file/_file_image.py @@ -51,8 +51,8 @@ def __init__( :type pathname: :param filename: Filename of file or last chunk of URL :type filename: - :param rescale: - :type rescale: + :param rescale: Whether to do metadata-based rescale (True), type-based rescale (False), or manual rescale (float) + :type rescale: boolean or float :param series: :type series: :param index: @@ -359,6 +359,7 @@ def __set_image(self): stack.append(img) img = numpy.dstack(stack) if isinstance(self.rescale, float): + # TODO - 4955: careful here with casting # Apply a manual rescale img = img.astype(numpy.float32) / self.rescale self.__image = Image(