TomographicImaging / CCPi-Regularisation-Toolkit

The set of CPU/GPU optimised regularisation modules for iterative image reconstruction and other image processing tasks
Apache License 2.0
49 stars 25 forks source link

regularizer seem to be invoked in a thread #13

Closed paskino closed 6 years ago

paskino commented 6 years ago

Windows build seems to be invoked in a thread and returns strange values.

paskino commented 6 years ago

Linux call has the same problem.

The output is expected to be a list with an array of shape (512,512) inside. What I get is a list with 512 vectors of length 512 (TO BE TESTED).

dkazanc commented 6 years ago

which regularizer is this? How can I test it from Python? I guess I need to compile the regularizers somehow?

paskino commented 6 years ago

These are the CPU regularizers.

To compile:

  1. in the main directory (CCPi-FISTA_Reconstruction)
  2. export CIL_VERSION=0.9.1
  3. conda build recipes/regularizers --numpy 1.12 --python 3.5
  4. conda install cil_regularizer=0.9.1 --use-local --force
  5. in the Wrappers/Python directory
  6. conda build conda-recipe --numpy 1.12 --python 3.5
  7. conda install ccpi-regularizer=0.9.1 --use-local --force

There is a test script for the regularizers in test: test_regularizers.py. Just adjust the location of Lena image.

To build the FISTA Python implementation (regularizers won't work!)

  1. conda build fista-recipe --numpy 1.12 --python 3.5
  2. conda install ccpi-fista=0.9.1 --use-local --force

Notice that there isn't any dependency check when installing local packages (and moreover with --force)