summaryrefslogtreecommitdiffstats
path: root/samples/matlab
diff options
context:
space:
mode:
Diffstat (limited to 'samples/matlab')
-rw-r--r--samples/matlab/s001_sinogram_par2d.m6
-rw-r--r--samples/matlab/s002_data2d.m6
-rw-r--r--samples/matlab/s003_gpu_reconstruction.m6
-rw-r--r--samples/matlab/s004_cpu_reconstruction.m6
-rw-r--r--samples/matlab/s005_3d_geometry.m6
-rw-r--r--samples/matlab/s006_3d_data.m6
-rw-r--r--samples/matlab/s007_3d_reconstruction.m6
-rw-r--r--samples/matlab/s008_gpu_selection.m6
-rw-r--r--samples/matlab/s009_projection_matrix.m6
-rw-r--r--samples/matlab/s010_supersampling.m6
-rw-r--r--samples/matlab/s011_object_info.m6
-rw-r--r--samples/matlab/s012_masks.m6
-rw-r--r--samples/matlab/s013_constraints.m6
-rw-r--r--samples/matlab/s014_FBP.m8
-rw-r--r--samples/matlab/s015_fp_bp.m6
-rw-r--r--samples/matlab/s016_plots.m6
-rw-r--r--samples/matlab/s017_opTomo.m6
-rw-r--r--samples/matlab/s020_3d_multiGPU.m6
-rw-r--r--samples/matlab/s022_fbp_cor.m66
19 files changed, 121 insertions, 55 deletions
diff --git a/samples/matlab/s001_sinogram_par2d.m b/samples/matlab/s001_sinogram_par2d.m
index 0295cdf..5c49758 100644
--- a/samples/matlab/s001_sinogram_par2d.m
+++ b/samples/matlab/s001_sinogram_par2d.m
@@ -1,10 +1,10 @@
% -----------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
-% 2014-2016, CWI, Amsterdam
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
% License: Open Source under GPLv3
-% Contact: astra@uantwerpen.be
+% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
% -----------------------------------------------------------------------
diff --git a/samples/matlab/s002_data2d.m b/samples/matlab/s002_data2d.m
index b082cb3..f075291 100644
--- a/samples/matlab/s002_data2d.m
+++ b/samples/matlab/s002_data2d.m
@@ -1,10 +1,10 @@
% -----------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
-% 2014-2016, CWI, Amsterdam
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
% License: Open Source under GPLv3
-% Contact: astra@uantwerpen.be
+% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
% -----------------------------------------------------------------------
diff --git a/samples/matlab/s003_gpu_reconstruction.m b/samples/matlab/s003_gpu_reconstruction.m
index d98f720..4a2cec7 100644
--- a/samples/matlab/s003_gpu_reconstruction.m
+++ b/samples/matlab/s003_gpu_reconstruction.m
@@ -1,10 +1,10 @@
% -----------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
-% 2014-2016, CWI, Amsterdam
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
% License: Open Source under GPLv3
-% Contact: astra@uantwerpen.be
+% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
% -----------------------------------------------------------------------
diff --git a/samples/matlab/s004_cpu_reconstruction.m b/samples/matlab/s004_cpu_reconstruction.m
index 96f892a..c3b7a95 100644
--- a/samples/matlab/s004_cpu_reconstruction.m
+++ b/samples/matlab/s004_cpu_reconstruction.m
@@ -1,10 +1,10 @@
% -----------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
-% 2014-2016, CWI, Amsterdam
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
% License: Open Source under GPLv3
-% Contact: astra@uantwerpen.be
+% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
% -----------------------------------------------------------------------
diff --git a/samples/matlab/s005_3d_geometry.m b/samples/matlab/s005_3d_geometry.m
index 227dccd..df3ffad 100644
--- a/samples/matlab/s005_3d_geometry.m
+++ b/samples/matlab/s005_3d_geometry.m
@@ -1,10 +1,10 @@
% -----------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
-% 2014-2016, CWI, Amsterdam
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
% License: Open Source under GPLv3
-% Contact: astra@uantwerpen.be
+% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
% -----------------------------------------------------------------------
diff --git a/samples/matlab/s006_3d_data.m b/samples/matlab/s006_3d_data.m
index dd45550..9fac2f8 100644
--- a/samples/matlab/s006_3d_data.m
+++ b/samples/matlab/s006_3d_data.m
@@ -1,10 +1,10 @@
% -----------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
-% 2014-2016, CWI, Amsterdam
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
% License: Open Source under GPLv3
-% Contact: astra@uantwerpen.be
+% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
% -----------------------------------------------------------------------
diff --git a/samples/matlab/s007_3d_reconstruction.m b/samples/matlab/s007_3d_reconstruction.m
index 17c5d8c..6e47490 100644
--- a/samples/matlab/s007_3d_reconstruction.m
+++ b/samples/matlab/s007_3d_reconstruction.m
@@ -1,10 +1,10 @@
% -----------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
-% 2014-2016, CWI, Amsterdam
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
% License: Open Source under GPLv3
-% Contact: astra@uantwerpen.be
+% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
% -----------------------------------------------------------------------
diff --git a/samples/matlab/s008_gpu_selection.m b/samples/matlab/s008_gpu_selection.m
index 7a24028..4cf7392 100644
--- a/samples/matlab/s008_gpu_selection.m
+++ b/samples/matlab/s008_gpu_selection.m
@@ -1,10 +1,10 @@
% -----------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
-% 2014-2016, CWI, Amsterdam
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
% License: Open Source under GPLv3
-% Contact: astra@uantwerpen.be
+% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
% -----------------------------------------------------------------------
diff --git a/samples/matlab/s009_projection_matrix.m b/samples/matlab/s009_projection_matrix.m
index 645986b..b272be9 100644
--- a/samples/matlab/s009_projection_matrix.m
+++ b/samples/matlab/s009_projection_matrix.m
@@ -1,10 +1,10 @@
% -----------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
-% 2014-2016, CWI, Amsterdam
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
% License: Open Source under GPLv3
-% Contact: astra@uantwerpen.be
+% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
% -----------------------------------------------------------------------
diff --git a/samples/matlab/s010_supersampling.m b/samples/matlab/s010_supersampling.m
index 86a973d..7e52bc9 100644
--- a/samples/matlab/s010_supersampling.m
+++ b/samples/matlab/s010_supersampling.m
@@ -1,10 +1,10 @@
% -----------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
-% 2014-2016, CWI, Amsterdam
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
% License: Open Source under GPLv3
-% Contact: astra@uantwerpen.be
+% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
% -----------------------------------------------------------------------
diff --git a/samples/matlab/s011_object_info.m b/samples/matlab/s011_object_info.m
index 85665fd..96aff2a 100644
--- a/samples/matlab/s011_object_info.m
+++ b/samples/matlab/s011_object_info.m
@@ -1,10 +1,10 @@
% -----------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
-% 2014-2016, CWI, Amsterdam
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
% License: Open Source under GPLv3
-% Contact: astra@uantwerpen.be
+% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
% -----------------------------------------------------------------------
diff --git a/samples/matlab/s012_masks.m b/samples/matlab/s012_masks.m
index 26d48a2..9914f4b 100644
--- a/samples/matlab/s012_masks.m
+++ b/samples/matlab/s012_masks.m
@@ -1,10 +1,10 @@
% -----------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
-% 2014-2016, CWI, Amsterdam
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
% License: Open Source under GPLv3
-% Contact: astra@uantwerpen.be
+% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
% -----------------------------------------------------------------------
diff --git a/samples/matlab/s013_constraints.m b/samples/matlab/s013_constraints.m
index 07bdb05..aaaf4d1 100644
--- a/samples/matlab/s013_constraints.m
+++ b/samples/matlab/s013_constraints.m
@@ -1,10 +1,10 @@
% -----------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
-% 2014-2016, CWI, Amsterdam
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
% License: Open Source under GPLv3
-% Contact: astra@uantwerpen.be
+% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
% -----------------------------------------------------------------------
diff --git a/samples/matlab/s014_FBP.m b/samples/matlab/s014_FBP.m
index 4d1de13..1fc6f90 100644
--- a/samples/matlab/s014_FBP.m
+++ b/samples/matlab/s014_FBP.m
@@ -1,15 +1,15 @@
% -----------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
-% 2014-2016, CWI, Amsterdam
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
% License: Open Source under GPLv3
-% Contact: astra@uantwerpen.be
+% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
% -----------------------------------------------------------------------
vol_geom = astra_create_vol_geom(256, 256);
-proj_geom = astra_create_proj_geom('parallel', 1.0, 384, linspace2(0,pi,180));
+proj_geom = astra_create_proj_geom('fanflat', 1.0, 384, linspace2(0,2*pi,1800), 500, 0);
% As before, create a sinogram from a phantom
P = phantom(256);
diff --git a/samples/matlab/s015_fp_bp.m b/samples/matlab/s015_fp_bp.m
index 56c5ed4..34235d4 100644
--- a/samples/matlab/s015_fp_bp.m
+++ b/samples/matlab/s015_fp_bp.m
@@ -1,10 +1,10 @@
% -----------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
-% 2014-2016, CWI, Amsterdam
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
% License: Open Source under GPLv3
-% Contact: astra@uantwerpen.be
+% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
% -----------------------------------------------------------------------
diff --git a/samples/matlab/s016_plots.m b/samples/matlab/s016_plots.m
index 56f47d8..ac7c169 100644
--- a/samples/matlab/s016_plots.m
+++ b/samples/matlab/s016_plots.m
@@ -1,10 +1,10 @@
% -----------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
-% 2014-2016, CWI, Amsterdam
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
% License: Open Source under GPLv3
-% Contact: astra@uantwerpen.be
+% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
% -----------------------------------------------------------------------
diff --git a/samples/matlab/s017_opTomo.m b/samples/matlab/s017_opTomo.m
index 71f8d55..175287a 100644
--- a/samples/matlab/s017_opTomo.m
+++ b/samples/matlab/s017_opTomo.m
@@ -1,10 +1,10 @@
% -----------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
-% 2014-2016, CWI, Amsterdam
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
% License: Open Source under GPLv3
-% Contact: astra@uantwerpen.be
+% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
% -----------------------------------------------------------------------
diff --git a/samples/matlab/s020_3d_multiGPU.m b/samples/matlab/s020_3d_multiGPU.m
index 46b984e..e793848 100644
--- a/samples/matlab/s020_3d_multiGPU.m
+++ b/samples/matlab/s020_3d_multiGPU.m
@@ -1,10 +1,10 @@
% -----------------------------------------------------------------------
% This file is part of the ASTRA Toolbox
%
-% Copyright: 2010-2016, iMinds-Vision Lab, University of Antwerp
-% 2014-2016, CWI, Amsterdam
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
% License: Open Source under GPLv3
-% Contact: astra@uantwerpen.be
+% Contact: astra@astra-toolbox.com
% Website: http://www.astra-toolbox.com/
% -----------------------------------------------------------------------
diff --git a/samples/matlab/s022_fbp_cor.m b/samples/matlab/s022_fbp_cor.m
new file mode 100644
index 0000000..2820541
--- /dev/null
+++ b/samples/matlab/s022_fbp_cor.m
@@ -0,0 +1,66 @@
+% -----------------------------------------------------------------------
+% This file is part of the ASTRA Toolbox
+%
+% Copyright: 2010-2018, imec Vision Lab, University of Antwerp
+% 2014-2018, CWI, Amsterdam
+% License: Open Source under GPLv3
+% Contact: astra@astra-toolbox.com
+% Website: http://www.astra-toolbox.com/
+% -----------------------------------------------------------------------
+
+cor_shift = 3.6;
+
+vol_geom = astra_create_vol_geom(256, 256);
+proj_geom = astra_create_proj_geom('parallel', 1.0, 256, linspace2(0,pi,180));
+
+% Projection geometry with shifted center of rotation
+proj_geom_cor = astra_geom_postalignment(proj_geom, cor_shift);
+
+% As before, create a sinogram from a phantom, using the shifted center of rotation
+P = phantom(256);
+[sinogram_id, sinogram] = astra_create_sino_gpu(P, proj_geom_cor, vol_geom);
+figure(1); imshow(P, []);
+figure(2); imshow(sinogram, []);
+
+astra_mex_data2d('delete', sinogram_id);
+
+% We now re-create the sinogram data object as we would do when loading
+% an external sinogram, using a standard geometry, and try to do a reconstruction,
+% to show the misalignment artifacts caused by the shifted center of rotation
+sinogram_id = astra_mex_data2d('create', '-sino', proj_geom, sinogram);
+
+% Create a data object for the reconstruction
+rec_id = astra_mex_data2d('create', '-vol', vol_geom);
+
+% Set up the parameters for a reconstruction algorithm using the GPU
+cfg = astra_struct('FBP_CUDA');
+cfg.ReconstructionDataId = rec_id;
+cfg.ProjectionDataId = sinogram_id;
+alg_id = astra_mex_algorithm('create', cfg);
+astra_mex_algorithm('run', alg_id);
+
+% Get the result
+rec = astra_mex_data2d('get', rec_id);
+figure(3); imshow(rec, []);
+
+astra_mex_algorithm('delete', alg_id);
+astra_mex_data2d('delete', rec_id);
+
+% Now change back to the proper, shifted geometry, and do another reconstruction
+astra_mex_data2d('change_geometry', sinogram_id, proj_geom_cor);
+rec_id = astra_mex_data2d('create', '-vol', vol_geom);
+
+cfg = astra_struct('FBP_CUDA');
+cfg.ReconstructionDataId = rec_id;
+cfg.ProjectionDataId = sinogram_id;
+alg_id = astra_mex_algorithm('create', cfg);
+astra_mex_algorithm('run', alg_id);
+
+% Get the result
+rec = astra_mex_data2d('get', rec_id);
+figure(4); imshow(rec, []);
+
+
+astra_mex_algorithm('delete', alg_id);
+astra_mex_data2d('delete', rec_id);
+astra_mex_data2d('delete', sinogram_id);