# Retrieving the volume of mouse brain structures with allensdk

**URL:** <https://community.brain-map.org/t/retrieving-the-volume-of-mouse-brain-structures-with-allensdk/4050>\
**Category:** Technical\
**Tags:** atlas-mouse-brain-adult, analysis, allensdk\
**Created:** [January 7, 2025, 10:56pm UTC](https://community.brain-map.org/t/retrieving-the-volume-of-mouse-brain-structures-with-allensdk/4050 "2025-01-07T22:56:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![JuCorbo](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@JuCorbo](https://community.brain-map.org/u/JuCorbo)\
**Post date:** [January 7, 2025, 10:56pm UTC](https://community.brain-map.org/t/retrieving-the-volume-of-mouse-brain-structures-with-allensdk/4050/1 "2025-01-07T22:56:10Z")

</div>

Hi  
I have a dataset of cell counts that was generated using the mouse brain atlas’ segmentation. I want to normalize the counts using the structures’ volume in the atlas. I am trying to use the sdk in python to retrieve the volumes, but I cannot find out how to do so, in the documentation or using chat GPT.  
I so far have gotten information about structures using the ontologies api, like so:

> oa = OntologiesApi()
> 
> structure\_tree\_data = oa.get\_structures(structure\_graph\_ids=[1])

Which gotten me entries like:

> {‘acronym’: ‘FRP6a’,  
> ‘atlas\_id’: None,  
> ‘color\_hex\_triplet’: ‘268F45’,  
> ‘depth’: 7,  
> ‘failed’: False,  
> ‘failed\_facet’: 734881840,  
> ‘graph\_id’: 1,  
> ‘graph\_order’: 10,  
> ‘hemisphere\_id’: 3,  
> ‘id’: 526157196,  
> ‘name’: ‘Frontal pole, layer 6a’,  
> ‘neuro\_name\_structure\_id’: None,  
> ‘neuro\_name\_structure\_id\_path’: None,  
> ‘ontology\_id’: 1,  
> ‘parent\_structure\_id’: 184,  
> ‘safe\_name’: ‘Frontal pole layer 6a’,  
> ‘sphinx\_id’: 11,  
> ‘st\_level’: 11,  
> ‘structure\_id\_path’: ,  
> ‘structure\_name\_facet’: 1215326494,  
> ‘weight’: 8690},

But there does no seem to be information about the volume, and I could not find a description of the meaning of all the keys in the entries in the documentation.

Is this possible through the sdk? Am I using the right api? Where do I find the volumes if not in there?

Thank you

---

<div class="post-metadata">

**Author:** ![ray.sanchez](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/ray.sanchez/32/679_2.png) [@ray.sanchez](https://community.brain-map.org/u/ray.sanchez)\
**Post date:** [January 8, 2025, 6:07pm UTC](https://community.brain-map.org/t/retrieving-the-volume-of-mouse-brain-structures-with-allensdk/4050/2 "2025-01-08T18:07:20Z")

</div>

Hello,

Thank you for your question and for using the mouse brain atlas! You can find instructions and a link to example code describing how to obtain volumes here:  
[https://allensdk.readthedocs.io/en/latest/reference\_space.html#annotation-volumes](https://allensdk.readthedocs.io/en/latest/reference_space.html#annotation-volumes)  
Please let me know if this is not what you’re looking for and I’m happy to see how else we can help.

Thanks,  
Ray

---

<div class="post-metadata">

**Author:** ![JuCorbo](https://avatars.discourse-cdn.com/v4/letter/j/c6cbf5/32.png) [@JuCorbo](https://community.brain-map.org/u/JuCorbo)\
**Post date:** [January 10, 2025, 8:15pm UTC](https://community.brain-map.org/t/retrieving-the-volume-of-mouse-brain-structures-with-allensdk/4050/3 "2025-01-10T20:15:39Z")

</div>

Thanks for the help! I was not able to find a way to get what I needed there, but I found out that the volumes I was looking for were in the supplementary data of the atlas paper [https://doi.org/10.1016/j.cell.2020.04.007](https://doi.org/10.1016/j.cell.2020.04.007)

Julien

---

<div class="post-metadata">

**Author:** ![MargaritaTev](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@MargaritaTev](https://community.brain-map.org/u/MargaritaTev)\
**Post date:** [April 2, 2025, 3:02pm UTC](https://community.brain-map.org/t/retrieving-the-volume-of-mouse-brain-structures-with-allensdk/4050/4 "2025-04-02T15:02:44Z")

</div>

Hello Rey! I have the same question, but unfortunately I couldn’t follow the example you provided. The issue also couldn’t be solved in a way Julien solved it.  
Ideally, I need to have a csv file with the regions and volumes (in mm3) of the CCFv2 mouse atlas. Could you please help me with that? Thank you!
