pystack3d.intensity_rescaling_area module

Functions related to the intensity rescaling processing from averaged values contained in a area defined by the user

pystack3d.intensity_rescaling_area.init_args(params, shape)

Initialize arguments related to the current processing (‘intensity_rescaling_area’) and return a specific array to share (histo)

Parameters:
  • params (dict) – Dictionary related to the current process. See the related documentation for more details.

  • shape (tuple of 3 int) – Shape of the stack to process

Returns:

tmp – shared array (means or rescaling_factors) associated with the intensity rescaling processing

Return type:

numpy.ndarray(shape[0])

pystack3d.intensity_rescaling_area.intensity_rescaling_area(fnames=None, inds_partition=None, queue_incr=None, area=None, threshold_min=None, threshold_max=None, factors_range=None, output_dirname=None)

Function for image intensity rescaling according to the averaged gray evolution in an area specified by the user.

Parameters:
  • fnames (list of pathlib.Path, optional) – List of ‘.tif’ filenames to process

  • inds_partition (list of ints, optional) – List of indexes to be considered by the global var SHARED_ARRAY when working in multiprocessing

  • queue_incr (multiprocessing.Queue, optional) – Queue passed to the function to interact with the progress bar

  • area (iterable of 4 ints, optional) –

    Reference area, defined from coordinates (xmin, xmax, ymin, ymax) in px,

    to estimate the rescaling factors

  • threshold_min (floats, optional) – Relative thresholds used to exclude low and high values in the selected area

  • threshold_max (floats, optional) – Relative thresholds used to exclude low and high values in the selected area

  • factors_range (iterable of 2 floats, optional) – Authorized range for the rescaling factors. Default is (0.8, 1.2)

  • output_dirname (str, optional) – Directory pathname for process results saving

pystack3d.intensity_rescaling_area.plot(output_dirname)

Plot the specific data related to the current process