# Mask a mouse brain slice image by ROI or ROI's from a projection experiment

**URL:** <https://community.brain-map.org/t/mask-a-mouse-brain-slice-image-by-roi-or-rois-from-a-projection-experiment/3678>\
**Category:** Technical\
**Tags:** atlas-mouse-brain-adult, software, allensdk\
**Created:** [September 17, 2024, 7:29pm UTC](https://community.brain-map.org/t/mask-a-mouse-brain-slice-image-by-roi-or-rois-from-a-projection-experiment/3678 "2024-09-17T19:29:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonahb](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@jonahb](https://community.brain-map.org/u/jonahb)\
**Post date:** [September 17, 2024, 7:29pm UTC](https://community.brain-map.org/t/mask-a-mouse-brain-slice-image-by-roi-or-rois-from-a-projection-experiment/3678/1 "2024-09-17T19:29:24Z")

</div>

Can I mask a brain slice image, programatically or some other way, so that it only shows a given region of interest (eg. a layer of cortex) and the florescence data in it?

---

<div class="post-metadata">

**Author:** ![nalusk](https://avatars.discourse-cdn.com/v4/letter/n/7feea3/32.png) [@nalusk](https://community.brain-map.org/u/nalusk)\
**Post date:** [September 19, 2024, 5:41pm UTC](https://community.brain-map.org/t/mask-a-mouse-brain-slice-image-by-roi-or-rois-from-a-projection-experiment/3678/2 "2024-09-19T17:41:33Z")

</div>

Hi,

Take a look at this link from the allensdk: [Here](https://allensdk.readthedocs.io/en/latest/_static/examples/nb/reference_space.html#Constructing-a-structure-tree)

This should allow you to obtain a mask for a region of interest. Hopefully this addresses your question.

Best,  
Nick

---

<div class="post-metadata">

**Author:** ![jonahb](https://avatars.discourse-cdn.com/v4/letter/j/b19c9b/32.png) [@jonahb](https://community.brain-map.org/u/jonahb)\
**Post date:** [October 8, 2024, 6:30pm UTC](https://community.brain-map.org/t/mask-a-mouse-brain-slice-image-by-roi-or-rois-from-a-projection-experiment/3678/3 "2024-10-08T18:30:25Z")

</div>

thank you very much!
