summaryrefslogtreecommitdiffstats
path: root/matlab
diff options
context:
space:
mode:
authorWillem Jan Palenstijn <Willem.Jan.Palenstijn@cwi.nl>2014-07-23 12:19:10 +0000
committerwpalenst <Willem.Jan.Palenstijn@cwi.nl>2014-07-23 12:19:10 +0000
commit9495966ba55ea102b6285e98d7426622276156bb (patch)
tree9034e3edff92a9cea5318074fe049e301e4034ee /matlab
parenta767de5d2c96434df71c50bf7f46817d8f0598e6 (diff)
downloadastra-9495966ba55ea102b6285e98d7426622276156bb.tar.gz
astra-9495966ba55ea102b6285e98d7426622276156bb.tar.bz2
astra-9495966ba55ea102b6285e98d7426622276156bb.tar.xz
astra-9495966ba55ea102b6285e98d7426622276156bb.zip
Verify data is not sparse in astra_mex_data2d
Diffstat (limited to 'matlab')
-rw-r--r--matlab/mex/astra_mex_data2d_c.cpp8
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);