Commit f22623e9 authored by Michael Krause's avatar Michael Krause 🎉
Browse files

Add binary check for mask

parent 3bee9a8e
......@@ -27,6 +27,10 @@ if length(d_mat) ~= 3
error('Only implemented for 3D arrays, yet');
end
if numel(mask) ~= numel(find(mask==0)) + numel(find(mask==1))
error('Mask appears to be non-binary');
end
if all(all(all(mask == 0)))
warning('Mask is empty');
out.data = [];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment