-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add Cuttlebase cuttlefish atlas #338
base: main
Are you sure you want to change the base?
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
b42368b
to
c0f7e3d
Compare
for more information, see https://pre-commit.ci
…globe-atlasapi into cuttlefish-atlas
for more information, see https://pre-commit.ci
…globe-atlasapi into cuttlefish-atlas
for more information, see https://pre-commit.ci
… and right sides of regions to hierarchy file
…globe-atlasapi into cuttlefish-atlas
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
…ous code, mesh name did not match the region ID)
…use map_points_to, but currently the meshes are still not correctly aligned.
…globe-atlasapi into cuttlefish-atlas
for more information, see https://pre-commit.ci
…globe-atlasapi into cuttlefish-atlas
for more information, see https://pre-commit.ci
…an matrix multiplication, and attempted to translate meshes.
for more information, see https://pre-commit.ci
…g the Cuttlebase meshes.
…globe-atlasapi into cuttlefish-atlas
for more information, see https://pre-commit.ci
… generation script
…globe-atlasapi into cuttlefish-atlas
for more information, see https://pre-commit.ci
Hi @alessandrofelder, I think the code is ready for review now. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @kjungwoo5 - one last hurdle!
|
||
# process brain template MRI file | ||
print("Processing brain template:") | ||
brain_template = load.load_nii(template_path, as_array=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to rescale the template image here, because otherwise it get naively converted from np.float64
to np.uint16
. For an example of how this is done, see
brainglobe-atlasapi/brainglobe_atlasapi/atlas_generation/atlas_scripts/kim_devccf_mouse.py
Line 94 in a1cbccc
dmin = np.min(reference) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I'll try to get working on this soon!
I spoke too soon 🤦 - sorry. There is a second final hurdle: the annotation pixel value of equivalent regions in left and right hemisphere has to be the same in BrainGlobe - downstream tools depend on this. So we need some code to replace the pixels in the right hemisphere with the value of the pixel of the equivalent region in the left. I can help with this, if you like, @kjungwoo5 ? |
In addition to the brain atlas there is also a whole body cuttlefish atlas mentioned in this publication. It would be really cool to see that as another atlas available in brainglobe! |
One thing I noticed is that you include mesh url to the cuttlfish meshes but you don't use it, instead generating your own meshes from the segmentation. Is this intended? |
I assume not. If there are existing meshes, we should use them. |
@kjungwoo5 and I tried very hard to use the existing meshes.
|
What an effort! Just goes to show the value of standardising all components of atlases :) |
I would appreciate your help on this, thank you! |
Ah yes, thank you for pointing that out. That is a remnant of our previous attempts to use the existing meshes, as per @alessandrofelder's explanation. I will remove it in my next commit. |
Hey I made a commit to update the script name to match the api name :) Let me know if this is the right way to do this. I'm not sure how to use the github propose changes feature,. This is something introduced previously here #462 |
works up to regions 71,72
@kjungwoo5 I had some time to work on symmetrising the annotations for this atlas.
Thanks :) |
Description
What is this PR
Why is this PR needed?
We would like to add support for the cuttlebase.org cuttlefish atlas.
What does this PR do?
This adds a packaging script for the cuttlefish atlas.
References
Issue #206
How has this PR been tested?
The code has been tested locally.
Is this a breaking change?
No.
Does this PR require an update to the documentation?
If any features have changed, or have been added. Please explain how the documentation has been updated (and link to the associated PR). See here for details.
Checklist: