Skip to content

Commit

Permalink
fix iradon filter
Browse files Browse the repository at this point in the history
  • Loading branch information
hanjinliu committed Oct 31, 2023
1 parent 8a9e1f7 commit 4bc4480
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions impy/arrays/_utils/_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,8 @@ def iradon(

# This function is almost ported from `skimage.transform`.
def get_fourier_filter(size: int, filter_name: str):
if size % 2 != 0:
return get_fourier_filter(size + 1, filter_name)[1:]
n = xp.concatenate(
[xp.arange(1, size // 2 + 1, 2, dtype=np.float32),
xp.arange(size // 2 - 1, 0, -2, dtype=np.float32)]
Expand Down

0 comments on commit 4bc4480

Please sign in to comment.