BlueBrain / atlas-placement-hints

Tools to compute placement hints in the context of brain atlases.
Apache License 2.0
1 stars 2 forks source link

change metadata to ignore barrel cortex in layer placement hints #13

Closed alTeska closed 9 months ago

alTeska commented 11 months ago

Accompanying the atlas-commons pull request: https://github.com/BlueBrain/atlas-commons/pull/5

Aiming to solve the barrel columns issue:

https://github.com/BlueBrain/atlas-placement-hints/issues/12

lecriste commented 11 months ago

I would assign the ignore"["name"] and ignore["query"] values by reading the source feathers (as in here), rather than hardcoding them.

arnaudon commented 11 months ago

It is really not possible to have this ignore within the main regex? I'm not so versed in regex to know that, but I guess regex should be powerful enough for us to only change it, and not modify the code?

alTeska commented 11 months ago

@arnaudon: I tried and I used a little regex to find all of the barrel columns: "SSp-bfd-[^-]*$"

but I am unsure how to do this within one regex, please by all means if anyone does let me know :)

@lecriste: I disagree with loading the file, right now the regex provided inside the metadata is used for finding the children of the SSp-bfd. So this should work when there are no barrels or when we change the barrels' names as well.

arnaudon commented 11 months ago

Just playing with https://regexr.com/ I got for layer1:

Screenshot 2023-10-04 at 11 16 51

something like that should work, no?

lecriste commented 11 months ago

@lecriste: I disagree with loading the file, right now the regex provided inside the metadata is used for finding the children of the SSp-bfd. So this should work when there are no barrels or when we change the barrels' names as well.

Yes but the string "SSp-bfd" in "name" and in "query" is already contained in the feathers file, right? So instead of repeating it here, we can just read it from the file so if tomorrow we change region in the file, we don't need to change this code.

mgeplf commented 9 months ago

Since https://github.com/BlueBrain/atlas-commons/pull/5 was closed, I will close this too.