# Structure ids from annotation atlas do not match the structure ids in the json graph (mouse brain)

**URL:** <https://community.brain-map.org/t/structure-ids-from-annotation-atlas-do-not-match-the-structure-ids-in-the-json-graph-mouse-brain/1847>\
**Category:** Technical\
**Tags:** atlas-mouse-brain-adult, annotation, anatomy, how-to, atlas-reference-maps\
**Created:** [September 20, 2022, 8:25am UTC](https://community.brain-map.org/t/structure-ids-from-annotation-atlas-do-not-match-the-structure-ids-in-the-json-graph-mouse-brain/1847 "2022-09-20T08:25:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![edoumazane](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/edoumazane/32/2110_2.png) [@edoumazane](https://community.brain-map.org/u/edoumazane)\
**Post date:** [September 20, 2022, 8:25am UTC](https://community.brain-map.org/t/structure-ids-from-annotation-atlas-do-not-match-the-structure-ids-in-the-json-graph-mouse-brain/1847/1 "2022-09-20T08:25:09Z")

</div>

Hi,

I have downloaded:

- `http://download.alleninstitute.org/informatics-archive/current-release/mouse_ccf/annotation/ccf_2017/annotation_25.nrrd` (adult mouse brain annotation atlas, 25µm)
- `http://api.brain-map.org/api/v2/structure_graph_download/1.json` (JSON file which i think is the corresponding structure graph)

I think both are the latest version available.

However, among the 619 unique ids in the annotation atlas, 21 are not matching any in the JSON file:

```auto
{0, # universe
997,
182305696,
182305712,
312782560,
312782592,
312782656,
484682464,
526157184,
526322272,
527696992,
549009216,
560581568,
563807424,
576073728,
589508416,
589508480,
599626944,
606826624,
606826688,
607344832,
614454272,}

```

Some of this ids look familiar (but not identical) in the JSON, like in the isocortex:

```auto
 480149202 Rostrolateral lateral visual area   
 182305689 Primary somatosensory area, unassigned 
 480149230 Laterolateral anterior visual area 
 312782574 Laterointermediate area  
 312782628 Postrhinal area 
 480149258 Mediomedial anterior visual area 
 480149286 Mediomedial posterior visual area 
 480149314 Medial visual area 
 312782546 Anterior area 

```

… along with their children structures

How can I find a version of the JSON that matches the CCF3\_2017 annotation atlas (or a version of the atlas that matches the structure graph)?

Best,  
Etienne

---

<div class="post-metadata">

**Author:** ![lydian](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/lydian/32/174_2.png) [@lydian](https://community.brain-map.org/u/lydian)\
**Post date:** [September 22, 2022, 4:28am UTC](https://community.brain-map.org/t/structure-ids-from-annotation-atlas-do-not-match-the-structure-ids-in-the-json-graph-mouse-brain/1847/2 "2022-09-22T04:28:29Z")

</div>

Hi @edoumazane,

I think there might be some issues in the way you are accessing/opening annotation\_25.nrrd  
Note that you have to read it as 64-bit unsigned int values.

This gist shows how to open the file using SimpleITK and count the number of unique values.  
[unique\_value\_counts.py (github.com)](https://gist.github.com/lydiang/a1c403fd5ad3f6bc687d0031cd24d86a)

Resulting in:  
[value\_count.csv (github.com)](https://gist.github.com/lydiang/91277ea800bda4bca7c2bbaaf211462b)

---

<div class="post-metadata">

**Author:** ![edoumazane](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/edoumazane/32/2110_2.png) [@edoumazane](https://community.brain-map.org/u/edoumazane)\
**Post date:** [September 29, 2022, 5:07pm UTC](https://community.brain-map.org/t/structure-ids-from-annotation-atlas-do-not-match-the-structure-ids-in-the-json-graph-mouse-brain/1847/3 "2022-09-29T17:07:49Z")

</div>

Hi @lydian,  
Thank you very much for your help.

I was opening the annotation atlas `NRRD` file with `ImageJ` and saving it as a `TIFF` file (don’t do that!).

Accessing the annotation atlas `NRRD` file directly with `SimpleITK`, as you suggested, did the trick and solved my annotation problem.

As mentioned in [CCFv3 annotation: wrong IDs - #4 by NicoKiaru](https://community.brain-map.org/t/ccfv3-annotation-wrong-ids/1209/4), ImageJ fails to handle biggest integers properly because uint32 (which range from 0 to 4 294 967 295 = 2^32 -1) are converted into float32 (not precise enough for integers above 16 777 215 = 2^24 - 1).
