summaryrefslogtreecommitdiffstats
path: root/matlab/mex/mexInitFunctions.cpp
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2016-01-21 14:30:32 +0100
committerWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2016-01-21 14:30:47 +0100
commit96fa285132bf88462c33c5b24cc1b241fb3d4d73 (patch)
tree931f234c2e1c4f59fdf7a2bec3065f85c1e165fd /matlab/mex/mexInitFunctions.cpp
parent7f11ed333cdc93e9e93d4677f857d97ffbbfec87 (diff)
downloadastra-96fa285132bf88462c33c5b24cc1b241fb3d4d73.tar.gz
astra-96fa285132bf88462c33c5b24cc1b241fb3d4d73.tar.bz2
astra-96fa285132bf88462c33c5b24cc1b241fb3d4d73.tar.xz
astra-96fa285132bf88462c33c5b24cc1b241fb3d4d73.zip
Initialize Python plugins when available in Matlab
Diffstat (limited to 'matlab/mex/mexInitFunctions.cpp')
-rw-r--r--matlab/mex/mexInitFunctions.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/matlab/mex/mexInitFunctions.cpp b/matlab/mex/mexInitFunctions.cpp
index bd3df2c..7245af2 100644
--- a/matlab/mex/mexInitFunctions.cpp
+++ b/matlab/mex/mexInitFunctions.cpp
@@ -23,5 +23,13 @@ void initASTRAMex(){
if(!astra::CLogger::setCallbackScreen(&logCallBack)){
mexErrMsgTxt("Error initializing mex functions.");
}
+
mexIsInitialized=true;
+
+
+ // If we have support for plugins, initialize them.
+ // (NB: Call this after setting mexIsInitialized, to avoid recursively
+ // calling initASTRAMex)
+ mexEvalString("if exist('astra_mex_plugin_c') == 3; astra_mex_plugin_c('init'); end");
+
}