diff options
author | Tim <tim.elberfeld@uantwerpen.be> | 2018-11-16 10:14:17 +0100 |
---|---|---|
committer | Willem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl> | 2018-12-12 15:56:11 +0100 |
commit | 40979a6f4ab678a2f57ccaf8aede1156713e3bf8 (patch) | |
tree | 31262344ee3067691896f67a75d1655ed0cdd15c /samples | |
parent | c19b7e2a4a97ebc3a2c060d67a323e0e6fe66f91 (diff) | |
download | astra-40979a6f4ab678a2f57ccaf8aede1156713e3bf8.tar.gz astra-40979a6f4ab678a2f57ccaf8aede1156713e3bf8.tar.bz2 astra-40979a6f4ab678a2f57ccaf8aede1156713e3bf8.tar.xz astra-40979a6f4ab678a2f57ccaf8aede1156713e3bf8.zip |
add astra_plot_geom command and sample s024
Signed-off-by: Tim <tim.elberfeld@uantwerpen.be>
Diffstat (limited to 'samples')
-rw-r--r-- | samples/matlab/bunny.stl | bin | 0 -> 47484 bytes | |||
-rw-r--r-- | samples/matlab/s024_plot_geometry.m | 42 |
2 files changed, 42 insertions, 0 deletions
diff --git a/samples/matlab/bunny.stl b/samples/matlab/bunny.stl Binary files differnew file mode 100644 index 0000000..0b7fcaa --- /dev/null +++ b/samples/matlab/bunny.stl diff --git a/samples/matlab/s024_plot_geometry.m b/samples/matlab/s024_plot_geometry.m new file mode 100644 index 0000000..dd57997 --- /dev/null +++ b/samples/matlab/s024_plot_geometry.m @@ -0,0 +1,42 @@ +%% s024_plot_geometry.m +% brief example of usage for astra_plot_geom command +% - last update 16.11.2018 +% ----------------------------------------------------------------------- +% This file is part of the ASTRA Toolbox +% +% Copyright: 2010-2018, imec Vision Lab, University of Antwerp +% 2014-2018, CWI, Amsterdam +% License: Open Source under GPLv3 +% Contact: astra@astra-toolbox.com +% Website: http://www.astra-toolbox.com/ +% ----------------------------------------------------------------------- +%% +close all; + +% proj_geom = astra_create_example_cone('vec'); +% proj_geom = astra_create_example_cone('normal'); +proj_geom = astra_create_example_cone('helix'); +% proj_geom = astra_create_example_parallel3d('vec'); +% proj_geom = astra_create_example_fanflat('vec'); +% proj_geom = astra_create_example_fanflat(); +% proj_geom = astra_create_example_parallel3d(); +% proj_geom = create_example_cone('deform_vec'); + +astra_plot_geom(proj_geom); +hold on; + +vol_magn = 20; +phantom_size = 5; +phantom_px = 1500; +vx_size = phantom_size / phantom_px; % voxel size +vol_geom = astra_create_vol_geom(phantom_px, phantom_px, phantom_px); +line_width = 1; % line width for phantom +astra_plot_geom(vol_geom, vx_size, 'Magnification', vol_magn,... + 'LineWidth', line_width, 'Color', 'r'); + +% this magnification is empirically chosen to fit the stl file +cad_magn = 900; +astra_plot_geom('bunny.stl', cad_magn); + +hold off; +axis equal; |