Skip to content
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Wrappers/Python/test/test_reconstructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@
from cil.framework import AcquisitionGeometry
from cil.utilities.dataexample import SIMULATED_PARALLEL_BEAM_DATA, SIMULATED_CONE_BEAM_DATA, SIMULATED_SPHERE_VOLUME
from scipy.fft import fft, ifft
from skimage.transform.radon_transform import _get_fourier_filter as skimage_get_fourier_filter
import numpy as np
from utils import has_tigre, has_ipp, has_astra, has_nvidia, has_matplotlib, initialise_tests
from utils import has_tigre, has_ipp, has_astra, has_nvidia, has_matplotlib, has_skimage, initialise_tests

from cil.recon.Reconstructor import Reconstructor # checks on baseclass
from cil.recon.FBP import GenericFilteredBackProjection # checks on baseclass
Expand All @@ -43,6 +42,8 @@
if has_matplotlib:
import matplotlib.testing.compare as compare

if has_skimage:
from skimage.transform.radon_transform import _get_fourier_filter as skimage_get_fourier_filter

class Test_Reconstructor(unittest.TestCase):

Expand Down Expand Up @@ -241,7 +242,7 @@ def test_set_filter(self):
reconstructor.set_filter(filter[1:-1])


@unittest.skipUnless(has_tigre and has_ipp, "TIGRE or IPP not installed")
@unittest.skipUnless(has_tigre and has_ipp and has_skimage, "TIGRE, IPP or SKIMAGE not installed")
def test_get_filter_array(self):

reconstructor = GenericFilteredBackProjection(self.ad3D)
Expand Down
8 changes: 8 additions & 0 deletions Wrappers/Python/test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ def initialise_tests():
has_matplotlib = True
system_state['has_matplotlib'] = has_matplotlib

#has_skimage
module_info = importlib.util.find_spec("skimage")
if module_info is None:
has_skimage = False
else:
has_skimage = True
system_state['has_skimage']= has_skimage


# to disable prints from 3rd part libraries and tests
def disable_print():
Expand Down
18 changes: 18 additions & 0 deletions recipe/cil_demos_env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: cil_demos
channels:
- conda-forge
- https://software.repos.intel.com/python/conda
dependencies:
- python=3.12
- ccpi::cil=24.3.0
- numpy=1.26
- astra-toolbox=2.1=cuda*
- ccpi::tigre=2.6
- ccpi::ccpi-regulariser=24.0.1
- ccpi::tomophantom=2.0.0
- ipykernel
- ipywidgets
- scikit-image
- matplotlib-base >=3.3.0
- dxchange
- olefile >=0.46
8 changes: 8 additions & 0 deletions recipe/cil_env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: cil
channels:
- conda-forge
- https://software.repos.intel.com/python/conda
dependencies:
- python=3.12
- ccpi::cil=24.3.0
- numpy=1.26
17 changes: 17 additions & 0 deletions recipe/cil_test_env.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: cil_test
channels:
- conda-forge
- https://software.repos.intel.com/python/conda
dependencies:
- python=3.12
- ccpi::cil=24.3.0
- numpy=1.26
- astra-toolbox=2.1=cuda*
- ccpi::tigre=2.6
- ccpi::ccpi-regulariser=24.0.1
- ccpi::tomophantom=2.0.0
- scikit-image
- matplotlib-base >=3.3.0
- dxchange
- olefile >=0.46
- cvxpy
Loading