Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions neuroglancer/atlas.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
def align_point_sets(src, dst, with_scaling=True):
"""
Analytically computes a transformation that minimizes the squared error between source and destination.
The transformation is restricted to rigid + uniform scaling.
------------------------------------------------------
src is the dictionary of the brain we want to align
dst is the dictionary of the atlas structures
src is a numpy array of shape (struct_num X 3) where rows correspond to structures and columns to xyz.
dst is a numpy array of same shape as src. THe rows should correspond to the same sturcures as src.
Defaults to scaling true, which means the transformation is rigid and a uniform scale.
returns the linear transformation r, and the translation vector t
returns the linear transformation r (3x3) , and the translation vector t (3,1) as numpy arrays.
"""
assert src.shape == dst.shape
assert len(src.shape) == 2
Expand Down