aadd7d651389f213aaf33b08ab6f533a3ecc59db,cellprofiler/modules/correctilluminationcalculate.py,CorrectIlluminationCalculate,apply_scaling,#CorrectIlluminationCalculate#Any#Any#,711
Before Change
if sorted_pixel_data.shape[0] == 0:
return image
sorted_pixel_data.sort()
if self.rescale_option == cps.YES:
idx = int(sorted_pixel_data.shape[0] * ROBUST_FACTOR)
robust_minimum = sorted_pixel_data[idx]
pixel_data = pixel_data.copy()
pixel_data[pixel_data < robust_minimum] = robust_minimum
elif self.rescale_option == RE_MEDIAN:
idx = int(sorted_pixel_data.shape[0]/2)
robust_minimum = sorted_pixel_data[idx]
if robust_minimum == 0:
return image
output_pixels = pixel_data / robust_minimum
output_image = cpi.Image(output_pixels, parent_image = orig_image)
After Change
if image.pixel_data.ndim == 2:
output_pixels = scaling_fn_2d(image.pixel_data)
else:
output_pixels = np.dstack([
scaling_fn_2d(x) for x in image.pixel_data.transpose(2, 0, 1)])
output_image = cpi.Image(output_pixels, parent_image = orig_image)
return output_image
def validate_module(self, pipeline):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: CellProfiler/CellProfiler
Commit Name: aadd7d651389f213aaf33b08ab6f533a3ecc59db
Time: 2011-08-04
Author: leek@1fc53939-2000-0410-845c-e8453a809027
File Name: cellprofiler/modules/correctilluminationcalculate.py
Class Name: CorrectIlluminationCalculate
Method Name: apply_scaling
Project Name: CellProfiler/CellProfiler
Commit Name: 5e1ef7061bebd561d42db17f533727938eb7a395
Time: 2012-08-03
Author: leek@broadinstitute.org
File Name: cellprofiler/modules/saveimages.py
Class Name: SaveImages
Method Name: run_objects
Project Name: donlnz/nonconformist
Commit Name: aab2ef03ff533c1160742fafd2bf12133e227ddb
Time: 2015-03-19
Author: henrik.linusson@gmail.com
File Name: nonconformist/ensemble.py
Class Name: AggregatedCp
Method Name: predict