summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2017-10-11 15:42:05 +0100
committerEdoardo Pasca <edo.paskino@gmail.com>2017-10-11 15:42:05 +0100
commit3fffd568589137b17d1fbe44e55a757e3745a3b1 (patch)
treedf20968af27504f63f708729ace63ddab9ae64a8 /src
parent4534a11d1c32a65484f4f38348c27a7bb2d9ad19 (diff)
downloadregularization-3fffd568589137b17d1fbe44e55a757e3745a3b1.tar.gz
regularization-3fffd568589137b17d1fbe44e55a757e3745a3b1.tar.bz2
regularization-3fffd568589137b17d1fbe44e55a757e3745a3b1.tar.xz
regularization-3fffd568589137b17d1fbe44e55a757e3745a3b1.zip
added simple_astra_test.py
Diffstat (limited to 'src')
-rw-r--r--src/Python/test/simple_astra_test.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/Python/test/simple_astra_test.py b/src/Python/test/simple_astra_test.py
new file mode 100644
index 0000000..905eeea
--- /dev/null
+++ b/src/Python/test/simple_astra_test.py
@@ -0,0 +1,25 @@
+import astra
+import numpy
+
+detectorSpacingX = 1.0
+detectorSpacingY = 1.0
+det_row_count = 128
+det_col_count = 128
+
+angles_rad = numpy.asarray([i for i in range(360)], dtype=float) / 180. * numpy.pi
+
+proj_geom = astra.creators.create_proj_geom('parallel3d',
+ detectorSpacingX,
+ detectorSpacingY,
+ det_row_count,
+ det_col_count,
+ angles_rad)
+
+image_size_x = 64
+image_size_y = 64
+image_size_z = 32
+
+vol_geom = astra.creators.create_vol_geom(image_size_x,image_size_y,image_size_z)
+
+x1 = numpy.random.rand(image_size_z,image_size_y,image_size_x)
+sino_id, y = astra.creators.create_sino3d_gpu(x1, proj_geom, vol_geom)