Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Krause
zipmask
Commits
f22623e9
Commit
f22623e9
authored
May 04, 2020
by
Michael Krause
🎉
Browse files
Add binary check for mask
parent
3bee9a8e
Changes
1
Hide whitespace changes
Inline
Side-by-side
zipmask_pack.m
View file @
f22623e9
...
...
@@ -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
=
[];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment