Skip to content

Commit

Permalink
mex_compile file updated to fit any OS
Browse files Browse the repository at this point in the history
  • Loading branch information
dkazanc committed Apr 9, 2018
1 parent fae3849 commit a88e7c6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion matlab/Model2DGeneratorDemo.m
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,4 @@
figure;
subplot(1,2,1); imagesc(rec_an, [0 1]); daspect([1 1 1]); colormap hot; title('Analytical Sinogram Reconstruction [ASTRA]');
subplot(1,2,2); imagesc(rec_num, [0 1]); daspect([1 1 1]); colormap hot; title('Numerical Sinogram Reconstruction [ASTRA]');
%%
%%
14 changes: 8 additions & 6 deletions matlab/install/compile_mex.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@

fprintf('%s \n', 'Building functions...');
mex TomoP2DModel.c TomoP2DModel_core.c utils.c CFLAGS="\$CFLAGS -fopenmp -Wall -std=c99" LDFLAGS="\$LDFLAGS -fopenmp"
movefile TomoP2DModel.mexa64 ../matlab/compiled/
movefile TomoP2DModel.mex* ../matlab/compiled/
mex TomoP2DObject.c TomoP2DModel_core.c utils.c CFLAGS="\$CFLAGS -fopenmp -Wall -std=c99" LDFLAGS="\$LDFLAGS -fopenmp"
movefile TomoP2DObject.mexa64 ../matlab/compiled/
movefile TomoP2DObject.mex* ../matlab/compiled/
mex TomoP2DModelSino.c TomoP2DModelSino_core.c utils.c CFLAGS="\$CFLAGS -fopenmp -Wall -std=c99" LDFLAGS="\$LDFLAGS -fopenmp"
movefile TomoP2DModelSino.mexa64 ../matlab/compiled/
movefile TomoP2DModelSino.mex* ../matlab/compiled/
mex TomoP2DObjectSino.c TomoP2DModelSino_core.c utils.c CFLAGS="\$CFLAGS -fopenmp -Wall -std=c99" LDFLAGS="\$LDFLAGS -fopenmp"
movefile TomoP2DObjectSino.mexa64 ../matlab/compiled/
movefile TomoP2DObjectSino.mex* ../matlab/compiled/
mex TomoP3DModel.c TomoP3DModel_core.c utils.c CFLAGS="\$CFLAGS -fopenmp -Wall -std=c99" LDFLAGS="\$LDFLAGS -fopenmp"
movefile TomoP3DModel.mexa64 ../matlab/compiled/
movefile TomoP3DModel.mex* ../matlab/compiled/
mex TomoP3DObject.c TomoP3DModel_core.c utils.c CFLAGS="\$CFLAGS -fopenmp -Wall -std=c99" LDFLAGS="\$LDFLAGS -fopenmp"
movefile TomoP3DObject.mexa64 ../matlab/compiled/
movefile TomoP3DObject.mex* ../matlab/compiled/
mex BackProjCPU.c CFLAGS="\$CFLAGS -fopenmp -Wall -std=c99" LDFLAGS="\$LDFLAGS -fopenmp"
movefile BackProjCPU.mex* ../matlab/compiled/
fprintf('%s \n', 'All compiled!');

cd ../
Expand Down
2 changes: 1 addition & 1 deletion python/Demos/astraOP.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def backproj(self, sinogram):
"""Applying backprojection"""
rec_id, image = astra.create_backprojection(sinogram, self.proj_id)
astra.data2d.delete(self.proj_id)
astra.data2d.delete(rec_id)
astra.data2d.delete(rec_id)
return image
def fbp2D(self, sinogram):
"""perform FBP reconstruction"""
Expand Down

0 comments on commit a88e7c6

Please sign in to comment.