# Mis-registration of EM image coordinates using Cloudvolume for mm^3 (minnie) volume

**URL:** <https://community.brain-map.org/t/mis-registration-of-em-image-coordinates-using-cloudvolume-for-mm-3-minnie-volume/3404>\
**Category:** Technical\
**Tags:** python, em, how-to\
**Created:** [June 17, 2024, 10:54pm UTC](https://community.brain-map.org/t/mis-registration-of-em-image-coordinates-using-cloudvolume-for-mm-3-minnie-volume/3404 "2024-06-17T22:54:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shandran](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/shandran/32/675_2.png) [@shandran](https://community.brain-map.org/u/shandran)\
**Post date:** [June 17, 2024, 10:54pm UTC](https://community.brain-map.org/t/mis-registration-of-em-image-coordinates-using-cloudvolume-for-mm-3-minnie-volume/3404/1 "2024-06-17T22:54:04Z")

</div>

I am pulling the electron micrograph image data from the minnie volume (mm^3) using modified version of the tutorial notebook ImageAndSegmentationDowload.ipynb.

I have used this [successfully](https://github.com/shandran/layer23-volume/blob/main/astrocyte_mitochondria_inclusions/EM_image_generator_master_astrocyte_inclusions.ipynb) on the Layer 2/3 volume (pinky).

However, when attempting to make a similar notebook for the minnie volume, the image data pulled from cloudvolume is mis-registered, that is, it doesn’t match the same coordinates as displayed in neuroglancer.

The cell of interest is: 864691134964446239  
The x,y,z, position is: 172695, 135328, 20958  
Here is the [neuroglancer link](https://ngl.microns-explorer.org/#!%7B%22dimensions%22:%7B%22x%22:%5B4e-9%2C%22m%22%5D%2C%22y%22:%5B4e-9%2C%22m%22%5D%2C%22z%22:%5B4e-8%2C%22m%22%5D%7D%2C%22position%22:%5B172695.5%2C135328.5%2C20958.5%5D%2C%22crossSectionScale%22:7.096617776349856%2C%22projectionOrientation%22:%5B0.021348824724555016%2C-0.17453671991825104%2C-0.007549765054136515%2C-0.9843902587890625%5D%2C%22projectionScale%22:489587.6696286937%2C%22layers%22:%5B%7B%22type%22:%22image%22%2C%22source%22:%7B%22url%22:%22precomputed://https://bossdb-open-data.s3.amazonaws.com/iarpa_microns/minnie/minnie65/em%22%2C%22subsources%22:%7B%22default%22:true%7D%2C%22enableDefaultSubsources%22:false%7D%2C%22tab%22:%22source%22%2C%22shaderControls%22:%7B%22normalized%22:%7B%22range%22:%5B86%2C172%5D%7D%7D%2C%22name%22:%22img65%22%7D%2C%7B%22type%22:%22image%22%2C%22source%22:%7B%22url%22:%22precomputed://https://bossdb-open-data.s3.amazonaws.com/iarpa_microns/minnie/minnie35/em%22%2C%22subsources%22:%7B%22default%22:true%7D%2C%22enableDefaultSubsources%22:false%7D%2C%22tab%22:%22source%22%2C%22shaderControls%22:%7B%22normalized%22:%7B%22range%22:%5B112%2C172%5D%7D%7D%2C%22name%22:%22img35%22%7D%2C%7B%22type%22:%22segmentation%22%2C%22source%22:%22precomputed://gs://iarpa_microns/minnie/minnie65/seg%22%2C%22tab%22:%22segments%22%2C%22annotationColor%22:%22#8f8f8a%22%2C%22selectedAlpha%22:0.41%2C%22notSelectedAlpha%22:0.06%2C%22segments%22:%5B%22864691134964446239%22%5D%2C%22colorSeed%22:1689220695%2C%22name%22:%22seg65%22%7D%2C%7B%22type%22:%22segmentation%22%2C%22source%22:%22precomputed://gs://iarpa_microns/minnie/minnie35/seg%22%2C%22tab%22:%22segments%22%2C%22annotationColor%22:%22#8a8a8a%22%2C%22segments%22:%5B%22864691137827278437%22%2C%22864691138020403235%22%2C%22864691138081021535%22%2C%22864691138134948293%22%2C%22864691138142870469%22%2C%22864691138153699060%22%2C%22864691138178964470%22%2C%22864691138345166401%22%5D%2C%22name%22:%22seg35%22%2C%22visible%22:false%7D%5D%2C%22showSlices%22:false%2C%22selectedLayer%22:%7B%22visible%22:true%2C%22layer%22:%22seg65%22%7D%2C%22layout%22:%7B%22type%22:%22xy-3d%22%2C%22orthographicProjection%22:true%7D%7D) and here is a [screenshot](https://github.com/shandran/minnie-volume/blob/main/notebooks/debug/864691134964446239_neuroglancer.png) on my github repo.

I have posted my code [here in my debug folder on github](https://github.com/shandran/minnie-volume/blob/main/notebooks/debug/minnie_em_viewer_misregistration_problem_debug.ipynb), and you can see that it is pulling different coordinates than Neuroglancer, even though the xyz _should be_ the same. I can’t figure out what I’m doing wrong. Any help would be greatly appreciated.

Shawn

---

<div class="post-metadata">

**Author:** ![fcollman](https://yyz1.discourse-cdn.com/flex027/user_avatar/community.brain-map.org/fcollman/32/1290_2.png) [@fcollman](https://community.brain-map.org/u/fcollman)\
**Post date:** [June 20, 2024, 10:49pm UTC](https://community.brain-map.org/t/mis-registration-of-em-image-coordinates-using-cloudvolume-for-mm-3-minnie-volume/3404/2 "2024-06-20T22:49:03Z")

</div>

This is caused because the coordinates you were entering were in 4,4,40 coordinates, but the segmentation’s base segmentation level was in 8,8,40 at mip 0. See cv.resolution and the units on the coordinates in the upper left of your neuroglancer link.
