summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2017-08-23 16:54:01 +0100
committerEdoardo Pasca <edo.paskino@gmail.com>2017-08-23 16:54:01 +0100
commitb4ea57f337172dad7352b4ccc09f2ba0f17dbe35 (patch)
tree7a68f204b448f8e66c70f59ba6086c485a23bec0 /src
parentbd4c6178258212bf075f19ff3638c12d46e0f819 (diff)
parentcc3a464ec587e95ddfd421cd3836a7677dfb9744 (diff)
downloadregularization-b4ea57f337172dad7352b4ccc09f2ba0f17dbe35.tar.gz
regularization-b4ea57f337172dad7352b4ccc09f2ba0f17dbe35.tar.bz2
regularization-b4ea57f337172dad7352b4ccc09f2ba0f17dbe35.tar.xz
regularization-b4ea57f337172dad7352b4ccc09f2ba0f17dbe35.zip
Merge branch 'pythonize' of https://github.com/vais-ral/CCPi-FISTA_Reconstruction into pythonize
Diffstat (limited to 'src')
-rw-r--r--src/Python/test/readhd5.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/Python/test/readhd5.py b/src/Python/test/readhd5.py
new file mode 100644
index 0000000..1e19e14
--- /dev/null
+++ b/src/Python/test/readhd5.py
@@ -0,0 +1,28 @@
+# -*- coding: utf-8 -*-
+"""
+Created on Wed Aug 23 16:34:49 2017
+
+@author: ofn77899
+"""
+
+import h5py
+import numpy
+
+def getEntry(nx, location):
+ for item in nx[location].keys():
+ print (item)
+
+filename = r'C:\Users\ofn77899\Documents\GitHub\CCPi-FISTA_reconstruction\Demos\DendrData.h5'
+nx = h5py.File(filename, "r")
+#getEntry(nx, '/')
+# I have exported the entries as children of /
+entries = [entry for entry in nx['/'].keys()]
+print (entries)
+
+Sino3D = numpy.asarray(nx.get('/Sino3D'))
+Weights3D = numpy.asarray(nx.get('/Weights3D'))
+angSize = numpy.asarray(nx.get('/angSize'), dtype=int)[0]
+angles_rad = numpy.asarray(nx.get('/angles_rad'))
+recon_size = numpy.asarray(nx.get('/recon_size'), dtype=int)[0]
+size_det = numpy.asarray(nx.get('/size_det'), dtype=int)[0]
+slices_tot = numpy.asarray(nx.get('/slices_tot'), dtype=int)[0] \ No newline at end of file