blob: bd3df2c49838cceb930414c6df1f040af4e61367 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include <mex.h>
#include "astra/Logging.h"
bool mexIsInitialized=false;
/**
* Callback to print log message to Matlab window.
*
*/
void logCallBack(const char *msg, size_t len){
mexPrintf("%s",msg);
}
/**
* Initialize mex functions.
*
*/
void initASTRAMex(){
if(mexIsInitialized) return;
astra::running_in_matlab=true;
if(!astra::CLogger::setCallbackScreen(&logCallBack)){
mexErrMsgTxt("Error initializing mex functions.");
}
mexIsInitialized=true;
}
|