- Structures from 3 reference brains (MD589, MD594, and MD585) are outlined by anatomists.
- The coordinates from those structures are used to created a set of averaged structures which is the Atlas.
- Yuncong used a virtual 3D space with units in 10microns. For example, the origin Yuncong derived for structure 3N_L is: [-165.58293065 -127.18518508 -38.94194041]
- That origin gets transformed into the COM in the Atlas box space with:
center = (origin + ndimage.measurements.center_of_mass(volume)) com = atlas_box_center + center * atlas_raw_scale / atlas_box_scales
- Where:
- atlas_box_size=(1000, 1000, 300) # Arbitrary size of the box we are using
- atlas_box_scales=(10, 10, 20) # scales for Neuroglancer of the box
- atlas_raw_scale=10 # raw Yuncong scale of 10microns
- atlas_box_center = atlas_box_size / 2 # The center of our "Atlas Box"
- resulting in: [-135.44472549 -108.49438786 -13.52838526] and this is placed in the database as the center of mass for the Atlas structure 3N_L
- All the remaining structure COMs are computed with the same procedure.
- make atlas coordinate units be microns
- Longer term: make coordinates conform to the Allen Atlas.
- make brain coordinate units be micrones.
- Process: origin -> center -> com, com is the point that is saved in the database.
- Fixing the database: multiply x and y by 10, multiply z by 20
- Fixing Neuroglancer: translate from the transformed coordinates, which are in microns, to section/pixel coordinates.
- atlas coordinate system: in microns from center of brain.
- stack coordinate system: in microns from top left, first section
- Neuroglancer coordinate system: in pixels within a section, section number.
-
Brain stack COMs are derived from Neuroglancer. For NTB brains, the resolution is 0.325 in the x and y directions and 20um in the z direction.
-
We get the Atlas and the brain coordinates into 1um space to make a common reference.
- Use atlas_box_scales = [10, 10, 20]
- Use brain reference_scales of [0.325, 0.325, 20]
-
With python we do:
common_keys = atlas_centers.keys() & reference_centers.keys() # get common structures atlas_point_set = np.array([atlas_centers[s] for s in structures if s in common_keys]).T atlas_point_set = np.diag(atlas_box_scales) @ atlas_point_set brain_point_set = np.array([reference_centers[s] for s in structures if s in common_keys]).T brain_point_set = np.diag(reference_scales) @ brain_point_set
- Then we send those two sets to the align_atlas method