From 3f5e4b145c22d2dd512d584cd71bd4ae60c08a49 Mon Sep 17 00:00:00 2001 From: Wim van Aarle Date: Tue, 24 Feb 2015 14:54:11 +0100 Subject: added get_geometry for 3d volume objects --- test_geometry.m | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test_geometry.m (limited to 'test_geometry.m') 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 -- cgit v1.2.3