From b90ba783ef5bc483078a2522cd21b683a0761b69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jostein=20B=C3=B8=20Fl=C3=B8ystad?= Date: Sat, 6 Jul 2013 18:27:08 +0200 Subject: [PATCH] iradon: Only allow interpolation methods working well. Of the interpolation methods provided by scipy.interpolate.interp1d, only cubic has been found to work well with the tests in skimage (other methods are either identical to linear or nearest, or they produce bad reconstructions). --- skimage/transform/radon_transform.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/skimage/transform/radon_transform.py b/skimage/transform/radon_transform.py index b99da511..2f2a18e7 100644 --- a/skimage/transform/radon_transform.py +++ b/skimage/transform/radon_transform.py @@ -139,9 +139,8 @@ def iradon(radon_image, theta=None, output_size=None, Filters available: ramp, shepp-logan, cosine, hamming, hann Assign None to use no filter. interpolation : str, optional (default 'linear') - Interpolation method used in reconstruction. - Methods available are the same as for `scipy.interpolate.interp1d: - 'linear', 'nearest', 'zero', 'slinear', 'quadratic' and 'cubic'. + Interpolation method used in reconstruction. Methods available: + 'linear', 'nearest', and 'cubic' ('cubic' is slow). circle : boolean, optional Assume the reconstructed image is zero outside the inscribed circle. Also changes the default output_size to match the behaviour of @@ -169,8 +168,7 @@ def iradon(radon_image, theta=None, output_size=None, if len(theta) != radon_image.shape[1]: raise ValueError("The given ``theta`` does not match the number of " "projections in ``radon_image``.") - interpolation_types = ('linear', 'nearest', 'zero', 'slinear', - 'quadratic', 'cubic') + interpolation_types = ('linear', 'nearest', 'cubic') if not interpolation in interpolation_types: raise ValueError("Unknown interpolation: %s" % interpolation) if not output_size: