-
Notifications
You must be signed in to change notification settings - Fork 24
Conversation
Extend the `mouse_e15_5` script by @pr4deepr to build all the atlases in the 3D reconstructed version of the Allen Developing Mouse Brain Atlas series. This build script is essentially the same except for the addition of a data class to configure the atlas parameters, which is implemented for each atlas.
Hey @yoda-vid, thanks for raising this PR. I'm looking through it now, but to answer your questions:
You're correct, but the output doesn't look right. Is the orientation of all the atlases the same? I took a look at the P56 one, and loading in both imageJ/napari it looks like it's
The resolutions here (and in all brainglobe software) aren't x, y, z. They're in the same order as the orientation of the data. Based on the above, these may be incorrect.
I think we need a lot more docs around this generally! |
As far as I can tell, these atlases all look good. It's just the resolution and orientation that needs checking. Up to you, but I think both you and @pr4deepr should share the packaging credit. |
Agreed. |
Thanks for your review, @adamltyson!
Yes, all of these atlases are in the same orientation. In the screenshot above, would you consider the image on the left (the original input) to be PIR? I'm admittedly not super familiar with the orientation nomenclature and just got PIR from the Allen docs for the original atlases. And the output image on the left is PSR? I could very well be wrong here so feel free to correct.
Ok makes sense, so the resolutions should be in the order of the output data, correct? For ASR orientation, these atlases would be in
Sure, happy to share with @pr4deepr ... it's definitely been fun working on this together! |
Just to confuse things, we use a different coordinate system to the Allen. We use the Python/Numpy system where the origin is top left corner of the first plane of the image. The first axis is then front to back, the second top to bottom, and the third left to right. With the caveat that one can't tell left from right just by eye, the left looks like If it helps, if the first plane of this image was olfactory bulb, it would be If the first plane of this image was the top of the brain it would be
Yes, this should be in the order of the output files, as they're read when the atlas is used. |
Change the input orientation to LSA to fit the NumPy convention used in BrainGlobe. Add docstrings describing the orientation and resolution assumptions in the configuration data class.
This is super helpful, thanks @adamltyson! Makes much more sense now. I also take it that the directions point "from" as opposed to "to" ? I think your explanation/examples here would be great for the docs! I've added them into our atlas script as well. I changed the input orientation to |
Per discussion at brainglobe/bg-atlasgen#25 (comment), the BrainGlobe resolutions correspond to the image's orientation in NumPy space. Commit 454fa60 introduced resolution reversal, but the resolution should be used as-is. Manually revert this change.
This looks great to me! Any thoughts @vigji or @FedeClaudi before I merge and upload these? The meshes could do with smoothing, but that's a general issue, not specific to these. |
Going to merge, as all looks good to me. |
Description
What is this PR
Why is this PR needed?
This PR extends the
mouse_e15_5
script by @pr4deepr in #11 to build all eight atlases in the 3D reconstructed version of the Allen Developing Mouse Brain Atlas series. Thanks for hosting these atlases!What does this PR do?
This build script is essentially the same as the original version except for the addition of a data class to configure the atlas parameters, which is implemented for each atlas in the same script. I've kept @pr4deepr's name as the package author as he built the original script.
Am I correct in understanding that the atlas generator reorients the atlas from the given orientation to ASR orientation? I input the orientation as PIR while the output metadata says ASR. Original is on the left, output on the right (or is it PSR?):
Also, are the resolutions in
x, y, z
order, and are they unchanged during atlas generation? These atlases are slightly anisotropic (same resolutions as the original), so I wanted to double-check and have listed the resolutions in this order.References
#11, which introduced the atlas creation script for the E15.5 atlas as well as a GUI. This current PR focuses on the atlas build script while the GUI implementation can continue in the original PR.
How has this PR been tested?
Built and tested locally (but haven't tested the meshes). I have run into sporadic connection errors during building at times, presumably network errors with the host (eg right at the moment).
Is this a breaking change?
No
Does this PR require an update to the documentation?
No, but it could be useful to update the docs on the orientation and also on the resolution order for non-isotropic atlases.
Checklist: