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).
This commit is contained in:
Jostein Bø Fløystad
2013-07-06 18:27:08 +02:00
parent 2be327815e
commit b90ba783ef
+3 -5
View File
@@ -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: