TomographicImaging / CIL

A versatile python framework for tomographic imaging
https://tomographicimaging.github.io/CIL/
Apache License 2.0
93 stars 41 forks source link

Regulariser plugin works only for CIL Data #1189

Open epapoutsellis opened 2 years ago

epapoutsellis commented 2 years ago

Check input fails when input does not have a geometry attribute, i.e. SIRF objects

https://github.com/TomographicImaging/CIL/blob/26f863aea98b339cc4f8f53f0d33f61a44742d5c/Wrappers/Python/cil/plugins/ccpi_regularisation/functions/regularisers.py#L307-L309

epapoutsellis commented 2 years ago

At the moment, we cannot use regularisation toolkit for SIRF because of check_input and the missing SIRF attributes .geometry and

https://github.com/TomographicImaging/CIL/blob/acf3ddf5c61b8e216fe7891d7720f9bbd436c9b3/Wrappers/Python/cil/plugins/ccpi_regularisation/functions/regularisers.py#L146-L148

  1. FGP_TV requires .geometry
  2. dTV requires .geometry
  3. TGV requires dimension_labels
  4. TNV requires .geometry

In addition, check_input is called every time proximal method is called https://github.com/TomographicImaging/CIL/blob/acf3ddf5c61b8e216fe7891d7720f9bbd436c9b3/Wrappers/Python/cil/plugins/ccpi_regularisation/functions/regularisers.py#L49-L50 which is not ideal in implicit PDHG/SPDHG or proximal gradient algorithms for example.