summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Readme.md15
-rw-r--r--demos/SoftwareX_supp/Demo_RealData_Recon_SX.py16
-rw-r--r--demos/SoftwareX_supp/Demo_SimulData_ParOptimis_SX.py13
-rw-r--r--demos/SoftwareX_supp/Demo_SimulData_Recon_SX.py18
-rw-r--r--demos/SoftwareX_supp/Readme.md2
5 files changed, 36 insertions, 28 deletions
diff --git a/Readme.md b/Readme.md
index 6c45023..f736415 100644
--- a/Readme.md
+++ b/Readme.md
@@ -4,10 +4,19 @@
|--------|-------------|-------------------|
| [![Build Status](https://anvil.softeng-support.ac.uk/jenkins/buildStatus/icon?job=CILsingle/CCPi-Regularisation-Toolkit)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit/) | [![Build Status](https://anvil.softeng-support.ac.uk/jenkins/buildStatus/icon?job=CILsingle/CCPi-Regularisation-Toolkit-dev)](https://anvil.softeng-support.ac.uk/jenkins/job/CILsingle/job/CCPi-Regularisation-Toolkit-dev/) | ![conda version](https://anaconda.org/ccpi/ccpi-regulariser/badges/version.svg) ![conda last release](https://anaconda.org/ccpi/ccpi-regulariser/badges/latest_release_date.svg) [![conda platforms](https://anaconda.org/ccpi/ccpi-regulariser/badges/platforms.svg) ![conda dowloads](https://anaconda.org/ccpi/ccpi-regulariser/badges/downloads.svg)](https://anaconda.org/ccpi/ccpi-regulariser) |
-**Iterative image reconstruction (IIR) methods frequently require regularisation to ensure convergence and make inverse problem well-posed. The CCPi-RGL toolkit provides a set of 2D/3D regularisation strategies to guarantee a better performance of IIR methods (higher SNR and resolution). The regularisation modules for scalar and vectorial datasets are based on the [proximal operator](https://en.wikipedia.org/wiki/Proximal_operator) framework and can be used with [proximal splitting algorithms](https://en.wikipedia.org/wiki/Proximal_gradient_method), such as PDHG, Douglas-Rachford, ADMM, FISTA and [others](https://arxiv.org/abs/0912.3522). While the main target for CCPi-RGL is [tomographic image reconstruction](https://github.com/dkazanc/TomoRec), the toolkit can be used for image denoising and inpaiting problems. The core modules are written in C-OMP and CUDA languages and wrappers for Matlab and Python are provided.**
+**Iterative image reconstruction (IIR) methods frequently require regularisation to ensure convergence and make inverse problem well-posed. The CCPi-RGL toolkit provides a set of 2D/3D regularisation strategies to guarantee a better performance of IIR methods (higher SNR and resolution). The regularisation modules for scalar and vectorial datasets are based on the [proximal operator](https://en.wikipedia.org/wiki/Proximal_operator) framework and can be used with [proximal splitting algorithms](https://en.wikipedia.org/wiki/Proximal_gradient_method), such as PDHG, Douglas-Rachford, ADMM, FISTA and [others](https://arxiv.org/abs/0912.3522). While the main target for CCPi-RGL is [tomographic image reconstruction](https://github.com/dkazanc/ToMoBAR), the toolkit can be used for image denoising and inpaiting problems. The core modules are written in C-OMP and CUDA languages and wrappers for Matlab and Python are provided.**
+
+
+<div align="center">
+ <img src="demos/images/probl.png" height="225"><br>
+</div>
+
+<div align="center">
+ <img src="demos/images/reg_penalties.jpg" height="450"><br>
+</div>
<div align="center">
- <img src="demos/images/CCPiRGL_sm.jpg" height="400"><br>
+ <img src="demos/images/TV_vs_NLTV.jpg" height="300"><br>
</div>
## Prerequisites:
@@ -173,7 +182,7 @@ addpath(/path/to/library);
### Applications:
-* [A library of tomographic reconstruction methods: direct and model-based iterative (MATLAB/Python code)](https://github.com/dkazanc/TomoRec)
+* [TOmographic MOdel-BAsed Reconstruction (ToMoBAR)](https://github.com/dkazanc/ToMoBAR)
* [Joint image reconstruction method with correlative multi-channel prior for X-ray spectral computed tomography (MATLAB code)](https://github.com/dkazanc/multi-channel-X-ray-CT)
### License:
diff --git a/demos/SoftwareX_supp/Demo_RealData_Recon_SX.py b/demos/SoftwareX_supp/Demo_RealData_Recon_SX.py
index 5991989..e60af6e 100644
--- a/demos/SoftwareX_supp/Demo_RealData_Recon_SX.py
+++ b/demos/SoftwareX_supp/Demo_RealData_Recon_SX.py
@@ -8,13 +8,13 @@ proximal splitting algorithms" by Daniil Kazantsev, Edoardo Pasca, Martin J. Tur
____________________________________________________________________________
* Reads real tomographic data (stored at Zenodo)
--- https://doi.org/10.5281/zenodo.2578893
-* Reconstructs using TomoRec software
+* Reconstructs using ToMoBAR software
* Saves reconstructed images
____________________________________________________________________________
>>>>> Dependencies: <<<<<
1. ASTRA toolbox: conda install -c astra-toolbox astra-toolbox
-2. TomoRec: conda install -c dkazanc tomorec
-or install from https://github.com/dkazanc/TomoRec
+2. tomobar: conda install -c dkazanc tomobar
+or install from https://github.com/dkazanc/ToMoBAR
3. libtiff if one needs to save tiff images:
install pip install libtiff
@@ -24,7 +24,7 @@ GPLv3 license (ASTRA toolbox)
import numpy as np
import matplotlib.pyplot as plt
import h5py
-from tomorec.supp.suppTools import normaliser
+from tomobar.supp.suppTools import normaliser
import time
# load dendritic projection data
@@ -60,7 +60,7 @@ time_label = int(time.time())
print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
print ("%%%%%%%%%%%%Reconstructing with FBP method %%%%%%%%%%%%%%%%%")
print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
-from tomorec.methodsDIR import RecToolsDIR
+from tomobar.methodsDIR import RecToolsDIR
RectoolsDIR = RecToolsDIR(DetectorsDimH = np.size(det_y_crop), # DetectorsDimH # detector dimension (horizontal)
DetectorsDimV = 100, # DetectorsDimV # detector dimension (vertical) for 3D case only
@@ -100,10 +100,10 @@ for i in range(0,np.size(FBPrec,0)):
"""
#%%
print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
-print ("Reconstructing with ADMM method using TomoRec software")
+print ("Reconstructing with ADMM method using tomobar software")
print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
-# initialise TomoRec ITERATIVE reconstruction class ONCE
-from tomorec.methodsIR import RecToolsIR
+# initialise tomobar ITERATIVE reconstruction class ONCE
+from tomobar.methodsIR import RecToolsIR
RectoolsIR = RecToolsIR(DetectorsDimH = np.size(det_y_crop), # DetectorsDimH # detector dimension (horizontal)
DetectorsDimV = 100, # DetectorsDimV # detector dimension (vertical) for 3D case only
AnglesVec = angles_rad, # array of angles in radians
diff --git a/demos/SoftwareX_supp/Demo_SimulData_ParOptimis_SX.py b/demos/SoftwareX_supp/Demo_SimulData_ParOptimis_SX.py
index be99afe..0925cf6 100644
--- a/demos/SoftwareX_supp/Demo_SimulData_ParOptimis_SX.py
+++ b/demos/SoftwareX_supp/Demo_SimulData_ParOptimis_SX.py
@@ -12,10 +12,9 @@ ____________________________________________________________________________
Demo_SimulData_Recon_SX.py
____________________________________________________________________________
>>>>> Dependencies: <<<<<
->>>>> Dependencies: <<<<<
1. ASTRA toolbox: conda install -c astra-toolbox astra-toolbox
-2. TomoRec: conda install -c dkazanc tomorec
-or install from https://github.com/dkazanc/TomoRec
+2. tomobar: conda install -c dkazanc tomobar
+or install from https://github.com/dkazanc/ToMoBAR
@author: Daniil Kazantsev, e:mail daniil.kazantsev@diamond.ac.uk
GPLv3 license (ASTRA toolbox)
@@ -66,10 +65,10 @@ plt.title('Tangentogram view')
plt.show()
#%%
print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
-print ("Reconstructing with ADMM method using TomoRec software")
+print ("Reconstructing with ADMM method using tomobar software")
print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
-# initialise TomoRec ITERATIVE reconstruction class ONCE
-from tomorec.methodsIR import RecToolsIR
+# initialise tomobar ITERATIVE reconstruction class ONCE
+from tomobar.methodsIR import RecToolsIR
RectoolsIR = RecToolsIR(DetectorsDimH = Horiz_det, # DetectorsDimH # detector dimension (horizontal)
DetectorsDimV = Vert_det, # DetectorsDimV # detector dimension (vertical) for 3D case only
AnglesVec = proj_angles, # array of angles in radians
@@ -158,4 +157,4 @@ h5f = h5py.File('Optim_admm_tgv.h5', 'w')
h5f.create_dataset('reg_param_tgv_vec', data=reg_param_tgv_vec)
h5f.create_dataset('erros_vec_tgv', data=erros_vec_tgv)
h5f.close()
-#%% \ No newline at end of file
+#%%
diff --git a/demos/SoftwareX_supp/Demo_SimulData_Recon_SX.py b/demos/SoftwareX_supp/Demo_SimulData_Recon_SX.py
index 63f94a7..1d3dc03 100644
--- a/demos/SoftwareX_supp/Demo_SimulData_Recon_SX.py
+++ b/demos/SoftwareX_supp/Demo_SimulData_Recon_SX.py
@@ -12,8 +12,8 @@ ____________________________________________________________________________
____________________________________________________________________________
>>>>> Dependencies: <<<<<
1. ASTRA toolbox: conda install -c astra-toolbox astra-toolbox
-2. TomoRec: conda install -c dkazanc tomorec
-or install from https://github.com/dkazanc/TomoRec
+2. ToMoBAR: conda install -c dkazanc tomobar
+or install from https://github.com/dkazanc/ToMoBAR
@author: Daniil Kazantsev, e:mail daniil.kazantsev@diamond.ac.uk
GPLv3 license (ASTRA toolbox)
@@ -103,15 +103,15 @@ plt.title('Vertical (Y-Z) view', fontsize=19)
plt.show()
#plt.savefig('projdata.pdf', format='pdf', dpi=1200)
#%%
-# initialise TomoRec DIRECT reconstruction class ONCE
-from tomorec.methodsDIR import RecToolsDIR
+# initialise tomobar DIRECT reconstruction class ONCE
+from tomobar.methodsDIR import RecToolsDIR
RectoolsDIR = RecToolsDIR(DetectorsDimH = Horiz_det, # DetectorsDimH # detector dimension (horizontal)
DetectorsDimV = Vert_det, # DetectorsDimV # detector dimension (vertical) for 3D case only
AnglesVec = proj_angles, # array of angles in radians
ObjSize = N_size, # a scalar to define reconstructed object dimensions
device = 'gpu')
#%%
-print ("Reconstruction using FBP from TomoRec")
+print ("Reconstruction using FBP from tomobar")
recFBP= RectoolsDIR.FBP(projdata_norm) # FBP reconstruction
#%%
x0, y0 = 0, 127 # These are in _pixel_ coordinates!!
@@ -152,10 +152,10 @@ ssim_fbp = Qtools.ssim(win2d)
print("Mean SSIM for FBP is {}".format(ssim_fbp[0]))
#%%
print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
-print ("Reconstructing with ADMM method using TomoRec software")
+print ("Reconstructing with ADMM method using tomobar software")
print ("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%")
-# initialise TomoRec ITERATIVE reconstruction class ONCE
-from tomorec.methodsIR import RecToolsIR
+# initialise tomobar ITERATIVE reconstruction class ONCE
+from tomobar.methodsIR import RecToolsIR
RectoolsIR = RecToolsIR(DetectorsDimH = Horiz_det, # DetectorsDimH # detector dimension (horizontal)
DetectorsDimV = Vert_det, # DetectorsDimV # detector dimension (vertical) for 3D case only
AnglesVec = proj_angles, # array of angles in radians
@@ -305,4 +305,4 @@ win = np.array([gaussian(11, 1.5)])
win2d = win * (win.T)
ssim_admm_tgv = Qtools.ssim(win2d)
print("Mean SSIM ADMM-TGV is {}".format(ssim_admm_tgv[0]))
-#%% \ No newline at end of file
+#%%
diff --git a/demos/SoftwareX_supp/Readme.md b/demos/SoftwareX_supp/Readme.md
index 54e83f1..a6463a0 100644
--- a/demos/SoftwareX_supp/Readme.md
+++ b/demos/SoftwareX_supp/Readme.md
@@ -9,7 +9,7 @@ Data is shared at Zenodo [here](https://doi.org/10.5281/zenodo.2578893)
## Dependencies:
1. [ASTRA toolbox](https://github.com/astra-toolbox/astra-toolbox): `conda install -c astra-toolbox astra-toolbox`
-2. [TomoRec](https://github.com/dkazanc/TomoRec): `conda install -c dkazanc tomorec`
+2. [ToMoBAR](https://github.com/dkazanc/ToMoBAR): `conda install -c dkazanc tomobar`
3. [Tomophantom](https://github.com/dkazanc/TomoPhantom): `conda install tomophantom -c ccpi`
## Files description: