Skip to content

Commit

Permalink
data added
Browse files Browse the repository at this point in the history
  • Loading branch information
dkazanc committed Dec 17, 2018
1 parent 22fa270 commit 05e284b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Wrappers/Python/Demos/DemoRec_RealData.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""
GPLv3 license (ASTRA toolbox)
Script to generate real tomographic X-ray data
Script to reconstruct real tomographic X-ray data (dendrites)
Dependencies:
* astra-toolkit, install conda install -c astra-toolbox astra-toolbox
Expand Down Expand Up @@ -83,4 +83,4 @@
plt.colorbar(ticks=[0, 0.5, 1], orientation='vertical')
plt.title('Regularised FISTA-OS reconstruction')
plt.show()
#%%
#%%
Binary file added data/DendrRawData.mat
Binary file not shown.
31 changes: 31 additions & 0 deletions data/exportDemoRD2Data.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
function [Sino3D, Weights3D, angles_rad, size_det] = exportDemoRD2Data()

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


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 PWLS 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')

return

0 comments on commit 05e284b

Please sign in to comment.