summaryrefslogtreecommitdiffstats
path: root/test_geometry.m
diff options
context:
space:
mode:
authorWim van Aarle <wimvanaarle@gmail.com>2015-02-24 14:54:11 +0100
committerWim van Aarle <wimvanaarle@gmail.com>2015-02-24 14:54:11 +0100
commit3f5e4b145c22d2dd512d584cd71bd4ae60c08a49 (patch)
treefd5bde6240e9189090b73e0be097fc653a3e9648 /test_geometry.m
parentf619aba4543de6b9a4fe6fb63b6f1840ef509846 (diff)
downloadastra-3f5e4b145c22d2dd512d584cd71bd4ae60c08a49.tar.gz
astra-3f5e4b145c22d2dd512d584cd71bd4ae60c08a49.tar.bz2
astra-3f5e4b145c22d2dd512d584cd71bd4ae60c08a49.tar.xz
astra-3f5e4b145c22d2dd512d584cd71bd4ae60c08a49.zip
added get_geometry for 3d volume objects
Diffstat (limited to 'test_geometry.m')
-rw-r--r--test_geometry.m24
1 files changed, 24 insertions, 0 deletions
diff --git a/test_geometry.m b/test_geometry.m
new file mode 100644
index 0000000..d8facc3
--- /dev/null
+++ b/test_geometry.m
@@ -0,0 +1,24 @@
+
+addpath(genpath('bin/'));
+addpath(genpath('matlab/'));
+
+%load('phantom3d');
+d = 256;
+I = ones(d,d,d);
+S = I > 0.5;
+
+%% create geometries
+vol_geom2d = astra_create_vol_geom(d,d);
+vol_geom3d = astra_create_vol_geom(d,d,d);
+
+
+%% create data objects
+vol2d_id = astra_mex_data2d('create', '-vol', vol_geom2d, 0);
+vol3d_id = astra_mex_data3d('create', '-vol', vol_geom3d, 0);
+
+%% get geometries
+vol_geom2d_new = astra_mex_data2d('get_geometry', vol2d_id);
+vol_geom3d_new = astra_mex_data3d('get_geometry', vol3d_id);
+
+
+astra_clear; \ No newline at end of file