Atlas Tools
Some important static methods used throughout the Django project.
- neuroglancer.atlas.align_atlas(animal, annotator_id, source, reverse=False, reference_scales=None)
This prepares the data for the align_point_sets method. Make sure we have at least 3 points
- Parameters
animal – the animal we are aligning to
input_type_id – the int defining what type of input. Taken from the input_type table with column=id
owner_id – the int defining the person. Taken from the auth_user table column=id
- Returns
a 3x3 matrix and a 1x3 matrix
- neuroglancer.atlas.brain_to_atlas_transform(brain_coord, r, t)
Taken from abakit Takes an x,y,z brain coordinates, and a rotation matrix and translation vector.
- Parameters
atlas_coord – tuple of x,y,z coordinates of the atlas in micrometers
r – float of the rotation matrix
t – vector of the translation matrix
- Returns
the point in atlas coordinates in micrometers.
- neuroglancer.atlas.get_annotation_dict(prep_id, annotator_id, source)
This method replaces get_centers_dict and get_layer_data_row.
- Parameters
prep_id – string name of animal
label – formerly layer, the string name of the layer
- neuroglancer.atlas.get_scales(prep_id)
A generic method to safely query and return resolutions. Note, since prep_id is a varchar, you can’t use objects.get, you must use objects.filter
- Parameters
prep_id – varchar of the primary key of the animal
- neuroglancer.atlas.umeyama(src, dst, with_scaling=True)
The Umeyama algorithm to register landmarks with rigid transform.
See the paper ‘Least-squares estimation of transformation parameters between two point patterns’.
- Parameters
src – List of data points.
dst – List of data points.
with_scaling – A boolean determining if we should scale or not.