Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Severe issue with apply_mask when applying multiple masks, e.g. pain_cog_emo #41

Open
abinary opened this issue Oct 10, 2021 · 0 comments

Comments

@abinary
Copy link

abinary commented Oct 10, 2021

When applying pain_cog_emo masks, some signatures always yield 0s. I traced it back to an error in a few lines in the code.

Lines 195 ... 197 in apply_mask.m:
to_remove = ~inboth(dat.volInfo.wh_inmask);
to_remove_mask = ~inboth(mask.volInfo.wh_inmask);

wh_inmask is always a single column
inboth is multi-column when applying multiple masks and only its first column is included in the current code.

I tried replacing line 171 from
inmaskdat = logical(mask.dat);
to
inmaskdat = get_nonempty_voxels(mask);
but this leads to improper norms for the data the mask is applied on.

Maybe the best way would be to check if multiple masks and run apply_mask again for each individually.

@abinary abinary closed this as completed Oct 16, 2021
@abinary abinary reopened this Oct 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant