Skip to content

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

@abinary

Description

@abinary

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions