From 9495966ba55ea102b6285e98d7426622276156bb Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 23 Jul 2014 12:19:10 +0000 Subject: Verify data is not sparse in astra_mex_data2d --- matlab/mex/astra_mex_data2d_c.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'matlab/mex') 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); -- cgit v1.2.3