Skip to content

Commit 7f0c077

Browse files
authored
Update for scikit-image>=0.20 (#215)
1 parent 69d0514 commit 7f0c077

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

ashlar/thumbnail.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,8 @@ def calculate_image_offset(img1, img2, upsample_factor=1):
4747
ref,
4848
test,
4949
upsample_factor=upsample_factor,
50-
normalization=None,
51-
return_error=False,
52-
)
50+
normalization=None
51+
)[0]
5352
return shift
5453

5554

ashlar/utils.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import itertools
33
import warnings
44
import skimage
5+
import skimage.restoration.uft
56
import scipy.ndimage
67
import numpy as np
78

@@ -35,14 +36,15 @@ def window(img):
3536
def register(img1, img2, sigma, upsample=10):
3637
img1w = window(whiten(img1, sigma))
3738
img2w = window(whiten(img2, sigma))
39+
3840
shift = skimage.registration.phase_cross_correlation(
3941
img1w,
4042
img2w,
4143
upsample_factor=upsample,
42-
normalization=None,
43-
return_error=False,
44-
)
45-
# At this point we may have a shift in the wrong quadrant since the FFT
44+
normalization=None
45+
)[0]
46+
47+
# At this point we may have a shift in the wrong quadrant since the FFT
4648
# assumes the signal is periodic. We test all four possibilities and return
4749
# the shift that gives the highest direct correlation (sum of products).
4850
shape = np.array(img1.shape)

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
'matplotlib>=3.1.2',
1414
'networkx>=2.4',
1515
'scipy>=1.4.1',
16-
'scikit-image>=0.19.2,<0.20', # The v1.0 API promises breaking changes.
16+
'scikit-image>=0.19.2',
1717
'scikit-learn>=0.21.1',
1818
'tifffile>=2023.3.15',
1919
'zarr>=2.11.3',

0 commit comments

Comments
 (0)