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

merge_atlases does not remove overlapping regions #37

Open
yonestar opened this issue May 11, 2020 · 0 comments
Open

merge_atlases does not remove overlapping regions #37

yonestar opened this issue May 11, 2020 · 0 comments

Comments

@yonestar
Copy link
Contributor

If two atlas being merged contain an overlapping set of regions, the merged atlas contains double copies of this region.

Toy example that reproduces the bug:

atlas_obj = load_atlas('canlab2018_2mm');
amy = select_atlas_subset(atlas_obj, {'Amy'})
double_amy = merge_atlases(amy, amy)

% check result
double_amy.labels

ans =

  1×8 cell array

    {'Amygdala_CM_'}    {'Amygdala_SF_'}    {'Amygdala_AStr_'}    {'Amygdala_LB_'}    {'Amygdala_CM_'}    {'Amygdala_SF_'}    {'Amygdala_AStr_'}    {'Amygdala_LB_'}

The 'always_replace' and the 'noreplace' options to merge_atlases do not address this.

I hesitate to try and fix because there already seems to be a complex logic regarding the 'always_replace' and the 'noreplace' options, and I am unsure how this would intersect with the issue reported here.

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