Skip to content

Commit

Permalink
Check if .sig exists if casting from statistic_image
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-Sun committed Aug 13, 2024
1 parent 7849913 commit 2595c02
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CanlabCore/@region/region.m
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,12 @@
% if size(mask.dat, 1) == mask.volInfo.nvox
% error('statistic_image objects should not have data vector (.dat) the length of full image space.')
% end

maskData = maskData .* mask.sig(:, 1);

% Default threshold
if ~isempty(mask.sig)
maskData = maskData .* mask.sig(:, 1);

end

end

Expand Down

0 comments on commit 2595c02

Please sign in to comment.