Skip to content

Commit

Permalink
Fixed compatibility with latest scikit-image release
Browse files Browse the repository at this point in the history
Signed-off-by: Nicola VIGANO <nicola.vigano@esrf.fr>
  • Loading branch information
Obi-Wan committed Mar 18, 2024
1 parent 3ff9c67 commit 0452b2d
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions corrct/filters.py
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
# -*- coding: utf-8 -*-
"""
Filtered back-projection filters.
@author: Nicola VIGANÒ, Computational Imaging group, CWI, The Netherlands,
and ESRF - The European Synchrotron, Grenoble, France
"""

from abc import ABC, abstractmethod
from collections.abc import Mapping, Sequence
from dataclasses import dataclass
from typing import Any, Optional, Union
import matplotlib.pyplot as plt
import numpy as np
from numpy.typing import ArrayLike, DTypeLike, NDArray
from scipy.interpolate import interp1d

import skimage.transform as skt

import matplotlib.pyplot as plt
from skimage.transform.radon_transform import _get_fourier_filter

from .operators import BaseTransform
from .processing import circular_mask

from typing import Union, Sequence, Optional, Any
from numpy.typing import ArrayLike, DTypeLike, NDArray

from abc import ABC, abstractmethod
from dataclasses import dataclass
from collections.abc import Mapping

try:
import pywt
Expand Down Expand Up @@ -514,7 +510,7 @@ def compute_filter(self, data_wu: NDArray) -> None:
"""
prj_size_pad = self.get_padding_size(data_wu.shape)

self.fbp_filter = skt.radon_transform._get_fourier_filter(prj_size_pad, self.filter_name)
self.fbp_filter = _get_fourier_filter(prj_size_pad, self.filter_name)
self.fbp_filter = np.squeeze(self.fbp_filter) * np.pi / (2 * data_wu.shape[-2])

if self.use_rfft:
Expand Down

0 comments on commit 0452b2d

Please sign in to comment.