diff options
Diffstat (limited to 'matlab')
-rw-r--r-- | matlab/mex/astra_mex_data2d_c.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/matlab/mex/astra_mex_data2d_c.cpp b/matlab/mex/astra_mex_data2d_c.cpp index 99fb38e..57f61c3 100644 --- a/matlab/mex/astra_mex_data2d_c.cpp +++ b/matlab/mex/astra_mex_data2d_c.cpp @@ -105,6 +105,10 @@ void astra_mex_data2d_create(int& nlhs, mxArray* plhs[], int& nrhs, const mxArra mexErrMsgTxt("Data must be single, double or logical."); return; } + if (mxIsSparse(prhs[2])) { + mexErrMsgTxt("Data may not be sparse."); + return; + } // SWITCH DataType if (sDataType == "-vol") { @@ -294,6 +298,10 @@ void astra_mex_data2d_store(int nlhs, mxArray* plhs[], int nrhs, const mxArray* mexErrMsgTxt("Data must be single, double or logical."); return; } + if (mxIsSparse(prhs[2])) { + mexErrMsgTxt("Data may not be sparse."); + return; + } // step2: get data object CFloat32Data2D* pDataObject = astra::CData2DManager::getSingleton().get(iDataID); |