From 9f7119b1c0da17af7f7e9e4f671d9fcdf66e2ea0 Mon Sep 17 00:00:00 2001 From: blink1073 Date: Sun, 16 Feb 2014 19:08:14 -0600 Subject: [PATCH] Change 'trim' to 'crop' --- skimage/exposure/_adapthist.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/skimage/exposure/_adapthist.py b/skimage/exposure/_adapthist.py index 552591f4..f5a6d0a1 100644 --- a/skimage/exposure/_adapthist.py +++ b/skimage/exposure/_adapthist.py @@ -26,7 +26,7 @@ NR_OF_GREY = 16384 # number of grayscale levels to use in CLAHE algorithm def equalize_adapthist(image, ntiles_x=8, ntiles_y=8, clip_limit=0.01, - nbins=256, mode='unchanged'): + nbins=256, mode='ignore'): """Contrast Limited Adaptive Histogram Equalization. Parameters @@ -42,7 +42,7 @@ def equalize_adapthist(image, ntiles_x=8, ntiles_y=8, clip_limit=0.01, contrast). nbins : int, optional Number of gray bins for histogram ("dynamic range"). - mode : string, one of {'unchanged', 'zero', 'trim'}, optional + mode : string, one of {'unchanged', 'zero', 'crop'}, optional How to treat any pixels falling outside of the tiles. See the notes. Returns @@ -79,7 +79,7 @@ def equalize_adapthist(image, ntiles_x=8, ntiles_y=8, clip_limit=0.01, args[0] = rescale_intensity(l_chan, out_range=(0, NR_OF_GREY - 1)) new_l = _clahe(*args).astype(float) new_l = rescale_intensity(new_l, out_range=(0, 100)) - if mode == 'trim': + if mode == 'crop': lab_img = new_l else: col, row = new_l.shape @@ -93,7 +93,7 @@ def equalize_adapthist(image, ntiles_x=8, ntiles_y=8, clip_limit=0.01, image = skimage.img_as_uint(image) args[0] = rescale_intensity(image, out_range=(0, NR_OF_GREY - 1)) out = _clahe(*args) - if mode == 'trim': + if mode == 'crop': image = out else: col, row = out.shape