summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authoralgol <dkazanc@hotmail.com>2017-10-26 15:29:16 +0100
committeralgol <dkazanc@hotmail.com>2017-10-26 15:29:16 +0100
commite6349ed946772ee25a2f3ea1eba03e4c77e4f75e (patch)
tree47dd09cac6b16c2dff2ae874538c3ea64281876f /demos
parenta4ee6ded8036fa1a10ef860478f49d2eb2cd11e0 (diff)
parented7dd1150261eddbc8dc5cea9b46ced884d5a884 (diff)
downloadregularization-e6349ed946772ee25a2f3ea1eba03e4c77e4f75e.tar.gz
regularization-e6349ed946772ee25a2f3ea1eba03e4c77e4f75e.tar.bz2
regularization-e6349ed946772ee25a2f3ea1eba03e4c77e4f75e.tar.xz
regularization-e6349ed946772ee25a2f3ea1eba03e4c77e4f75e.zip
Merge branch 'master' of https://github.com/vais-ral/CCPi-FISTA_Reconstruction
Diffstat (limited to 'demos')
-rw-r--r--demos/DendrData.h5bin0 -> 72598872 bytes
-rw-r--r--demos/exportDemoRD2Data.m35
2 files changed, 35 insertions, 0 deletions
diff --git a/demos/DendrData.h5 b/demos/DendrData.h5
new file mode 100644
index 0000000..f048268
--- /dev/null
+++ b/demos/DendrData.h5
Binary files differ
diff --git a/demos/exportDemoRD2Data.m b/demos/exportDemoRD2Data.m
new file mode 100644
index 0000000..028353b
--- /dev/null
+++ b/demos/exportDemoRD2Data.m
@@ -0,0 +1,35 @@
+clear all
+close all
+%%
+% % adding paths
+addpath('../data/');
+addpath('../main_func/'); addpath('../main_func/regularizers_CPU/');
+addpath('../supp/');
+
+load('DendrRawData.mat') % load raw data of 3D dendritic set
+angles_rad = angles*(pi/180); % conversion to radians
+size_det = size(data_raw3D,1); % detectors dim
+angSize = size(data_raw3D, 2); % angles dim
+slices_tot = size(data_raw3D, 3); % no of slices
+recon_size = 950; % reconstruction size
+
+Sino3D = zeros(size_det, angSize, slices_tot, 'single'); % log-corrected sino
+% normalizing the data
+for jj = 1:slices_tot
+ sino = data_raw3D(:,:,jj);
+ for ii = 1:angSize
+ Sino3D(:,ii,jj) = log((flats_ar(:,jj)-darks_ar(:,jj))./(single(sino(:,ii)) - darks_ar(:,jj)));
+ end
+end
+
+Sino3D = Sino3D.*1000;
+Weights3D = single(data_raw3D); % weights for PW model
+clear data_raw3D
+
+hdf5write('DendrData.h5', '/Weights3D', Weights3D)
+hdf5write('DendrData.h5', '/Sino3D', Sino3D, 'WriteMode', 'append')
+hdf5write('DendrData.h5', '/angles_rad', angles_rad, 'WriteMode', 'append')
+hdf5write('DendrData.h5', '/size_det', size_det, 'WriteMode', 'append')
+hdf5write('DendrData.h5', '/angSize', angSize, 'WriteMode', 'append')
+hdf5write('DendrData.h5', '/slices_tot', slices_tot, 'WriteMode', 'append')
+hdf5write('DendrData.h5', '/recon_size', recon_size, 'WriteMode', 'append') \ No newline at end of file