Skip to content

Commit 52704ab

Browse files
committed
add warning in case of creating empty roi
1 parent 85197b9 commit 52704ab

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/roi/keepHemisphere.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545

4646
hdr.fname = spm_file(inputImage, 'filename', bf.filename);
4747

48+
if not(any(vol(:)))
49+
warning('This image will be empty:\n\t%s\n');
50+
end
51+
4852
spm_write_vol(hdr, vol);
4953

5054
outputImage = hdr.fname;

0 commit comments

Comments
 (0)