Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.

Authors: F. Cazals and T. Dreyfus
The point set registration consists on finding a spatial transformation aligning a set of points onto another one. The registration is said rigid if the distance between all pairs of points is conserved by the transformation. This package defines a rigid registration between two set of 3D points where the spatial transformation is a composition of translations and rotations.
The rigid registration is done using a linear algebra algorithm that computes the optimal rotation matrix between the two input set of points using the Singular Value Decomposition (SVD) of their covariance matrix. Basically, once centered on the origin, the covariance matrix of the two input sets of points and is computed. The SVD of then produces orthogonal matrices representing rotations ( ) and deformations ( ) from to . By "removing" the deformation, it is then possible to compute the optimal rotation for aligning both set of points.
The algorithm then consists :
The algorithm is coded in the class SBL::GT::T_Point_cloud_rigid_registration_3< FT >, where FT is the number type used for representing the coordinates of the points (by default, the double type).
The class can be used in two modes :
Note that the second one is suited to cases where the same transformation has to be applied to a family of point clouds.
The constructor of SBL::GT::T_Point_cloud_rigid_registration_3 takes two containers of points and computes the associated rigid transformation. Then the class provides functors and methods for the aforementioned two modes :
For both modes, the input points clouds can be represented in three different ways :
The last one is useful when the input sets of points are represented by Ddimensional points, for exemple when computing the distance between molecular conformations (see package Molecular_distances)
The following example makes a registration of a set of points with the same set of points, but translated and rotated. It then computes the distance between pairs of corresponding points, computing the so called lRMSD (see package Molecular_distances).
This package offers alors a program for performing the rigid registration between a reference set of 3D points and a collection of sets of 3D points : sblalignpointclouds3.exe . An input set of 3D points is represented as a D dimensional point, where D is divisable by 3. A file listing D dimensional points is a text file where each point is represented by its dimension followed by its coordinates. Note that breaklines are not considered, so that having one D dimensional point per line, or one 3D point per line are both acceptable :
6 0 0 0 1 1 1
or
6 0 0 0 1 1 1
The program sblalignpointclouds3.exe takes two files as input : the first one containing one D dimensional point representing the reference set of points, and the second containing any number of D dimensional points.