61864ef2dc49bcb7a29921b99a63514de263033b,cellprofiler/modules/rescaleintensity.py,RescaleIntensity,manual_io_range,#RescaleIntensity#Any#Any#,371

Before Change


        dest_min = self.dest_scale.min
        dest_max = self.dest_scale.max
        rescaled_image = rescaled_image * (dest_max - dest_min) + dest_min
        return self.truncate_values(input_image,
                                    rescaled_image,
                                    dest_min, dest_max)

    def divide_by_image_minimum(self, input_image):
        """Divide the image by its minimum to get an illumination correction function"""

After Change


        return rescaled

    def manual_io_range(self, input_image, workspace):
        data = input_image.pixel_data

        mask = numpy.ones_like(data, dtype=numpy.bool)

        if input_image.has_mask:
            mask = input_image.mask

        in_range = self.get_source_range(input_image, workspace)

        out_range = (self.dest_scale.min, self.dest_scale.max)

        data[~mask] = 0

        rescaled = skimage.exposure.rescale_intensity(data, in_range=in_range, out_range=out_range)

        rescaled[~mask] = input_image.pixel_data[~mask]

        return rescaled

    def divide_by_image_minimum(self, input_image):
        """Divide the image by its minimum to get an illumination correction function"""
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 15

Instances


Project Name: CellProfiler/CellProfiler
Commit Name: 61864ef2dc49bcb7a29921b99a63514de263033b
Time: 2016-12-01
Author: mcquin@broadinstitute.org
File Name: cellprofiler/modules/rescaleintensity.py
Class Name: RescaleIntensity
Method Name: manual_io_range


Project Name: CellProfiler/CellProfiler
Commit Name: 61864ef2dc49bcb7a29921b99a63514de263033b
Time: 2016-12-01
Author: mcquin@broadinstitute.org
File Name: cellprofiler/modules/rescaleintensity.py
Class Name: RescaleIntensity
Method Name: manual_io_range


Project Name: CellProfiler/CellProfiler
Commit Name: 047cedb17ee34680910e4270cc338d4f961b545b
Time: 2016-12-01
Author: mcquin@broadinstitute.org
File Name: cellprofiler/modules/rescaleintensity.py
Class Name: RescaleIntensity
Method Name: stretch


Project Name: CellProfiler/CellProfiler
Commit Name: ec81bfde000dc918643a20d0a228232e9da781ed
Time: 2016-12-01
Author: mcquin@broadinstitute.org
File Name: cellprofiler/modules/rescaleintensity.py
Class Name: RescaleIntensity
Method Name: manual_input_range