Structural Bioinformatics Library
Template C++ / Python API for developping structural bioinformatics applications.
T_Point_cloud_rigid_registration_3< FT > Class Template Reference

Model of Distances for defining distance between two point clouds. More...

#include <Point_cloud_rigid_registration_3.hpp>

Public Member Functions

 T_Point_cloud_rigid_registration_3 (void)
 Initialize with no transformation;.
template<class PointContainer>
 T_Point_cloud_rigid_registration_3 (const PointContainer &x, const PointContainer &y)
 Initialize the transformation with from y to x (x is the reference)
template<class PointContainer>
 T_Point_cloud_rigid_registration_3 (const PointContainer &x, const PointContainer &y, std::vector< double > weights)
 Initialize the weighted transformation from y to x (x is the reference);.
template<class InputIterator1, class InputIterator2>
 T_Point_cloud_rigid_registration_3 (InputIterator1 begin_1, InputIterator1 end_1, InputIterator2 begin_2, InputIterator2 end_2)
 Initialize the transformation from the second set of points to the first set of points (the first set of points is the reference)
template<class InputIterator1, class InputIterator2>
 T_Point_cloud_rigid_registration_3 (InputIterator1 begin_1, InputIterator1 end_1, InputIterator2 begin_2, InputIterator2 end_2, std::vector< double > weights)
 Initialize the weighted transformation from the second set of points to the first set of points (the first set of points is the reference)
const Point_3 & get_reference_centroid (void) const
 Return the reference centroid if any.
template<class PointContainer, class OutputIterator>
OutputIterator transform (const PointContainer &points, OutputIterator out) const
 Make the rigid registration of the input points w.r.t the internal transformation, and output the transformed points.
template<class PointContainer, class OutputIterator>
OutputIterator transform (const PointContainer &points, const Point_3 &ref_centroid, OutputIterator out) const
 Make the rigid registration of the input points w.r.t the internal transformation and the given centroid, and output the transformed points.
template<class InputIterator, class OutputIterator>
OutputIterator transform (unsigned size, InputIterator begin, InputIterator end, OutputIterator out) const
 Same as before, but input and output are coordinates.
template<class InputIterator, class OutputIterator>
OutputIterator transform (InputIterator begin, InputIterator end, OutputIterator out) const
 Same as before, but points are represented by input iterators.
void set_weights (std::vector< double > weights)
 Initialize the weights (for weighted version)
void print_transform_matrix () const
 Print the matrix.
const Matrix & get_rotation () const
 Access to the rotation matrix.
const Vector_3 & get_translation () const
 Acces to the translation vector.
template<class PointContainer1, class PointContainer2, class OutputIterator>
OutputIterator operator() (const PointContainer1 &x, const PointContainer2 &y, OutputIterator out)
 Make the rigid registration from y to x, and return it in the output iterator.
template<class InputIterator1, class InputIterator2, class OutputIterator>
OutputIterator operator() (unsigned size_1, InputIterator1 begin_1, InputIterator1 end_1, unsigned size_2, InputIterator2 begin_2, InputIterator2 end_2, OutputIterator out)
 Same as before, but input is coordinates.
template<class InputIterator1, class InputIterator2, class OutputIterator>
OutputIterator operator() (InputIterator1 begin_1, InputIterator1 end_1, InputIterator2 begin_2, InputIterator2 end_2, OutputIterator out)
 Same as before, but points are represented by input iterators.

Detailed Description

template<class FT = double>
class SBL::GT::T_Point_cloud_rigid_registration_3< FT >

Model of Distances for defining distance between two point clouds.

Computes the least-Root Mean Squared Distance between two conformations. We use the Kabsch algorithm for finding the optimal rotation matrix that minimizes the $RMSD$*. Models for templates:Data_kernel: a linear kernel from CGAL defining points used for $l-RMSD$; Point_container: a stl container of points from Data_kernel (e.g a list); Local_kernel: a kernel from CGAL for the output $l-RMSD$

FT: Works with primitive types only

Constructor & Destructor Documentation

◆ T_Point_cloud_rigid_registration_3() [1/5]

template<class FT>
T_Point_cloud_rigid_registration_3 ( void )
inline

Initialize with no transformation;.

◆ T_Point_cloud_rigid_registration_3() [2/5]

template<class FT>
template<class PointContainer>
T_Point_cloud_rigid_registration_3 ( const PointContainer & x,
const PointContainer & y )
inline

Initialize the transformation with from y to x (x is the reference)

◆ T_Point_cloud_rigid_registration_3() [3/5]

template<class FT>
template<class PointContainer>
T_Point_cloud_rigid_registration_3 ( const PointContainer & x,
const PointContainer & y,
std::vector< double > weights )
inline

Initialize the weighted transformation from y to x (x is the reference);.

◆ T_Point_cloud_rigid_registration_3() [4/5]

template<class FT>
template<class InputIterator1, class InputIterator2>
T_Point_cloud_rigid_registration_3 ( InputIterator1 begin_1,
InputIterator1 end_1,
InputIterator2 begin_2,
InputIterator2 end_2 )
inline

Initialize the transformation from the second set of points to the first set of points (the first set of points is the reference)

◆ T_Point_cloud_rigid_registration_3() [5/5]

template<class FT>
template<class InputIterator1, class InputIterator2>
T_Point_cloud_rigid_registration_3 ( InputIterator1 begin_1,
InputIterator1 end_1,
InputIterator2 begin_2,
InputIterator2 end_2,
std::vector< double > weights )
inline

Initialize the weighted transformation from the second set of points to the first set of points (the first set of points is the reference)

Member Function Documentation

◆ get_reference_centroid()

template<class FT>
const T_Point_cloud_rigid_registration_3< FT >::Point_3 & get_reference_centroid ( void ) const
inline

Return the reference centroid if any.

◆ get_rotation()

template<class FT>
const T_Point_cloud_rigid_registration_3< FT >::Matrix & get_rotation ( ) const
inline

Access to the rotation matrix.

◆ get_translation()

template<class FT>
const T_Point_cloud_rigid_registration_3< FT >::Vector_3 & get_translation ( ) const
inline

Acces to the translation vector.

◆ operator()() [1/3]

template<class FT>
template<class PointContainer1, class PointContainer2, class OutputIterator>
OutputIterator operator() ( const PointContainer1 & x,
const PointContainer2 & y,
OutputIterator out )
inline

Make the rigid registration from y to x, and return it in the output iterator.

◆ operator()() [2/3]

template<class FT>
template<class InputIterator1, class InputIterator2, class OutputIterator>
OutputIterator operator() ( InputIterator1 begin_1,
InputIterator1 end_1,
InputIterator2 begin_2,
InputIterator2 end_2,
OutputIterator out )
inline

Same as before, but points are represented by input iterators.

◆ operator()() [3/3]

template<class FT>
template<class InputIterator1, class InputIterator2, class OutputIterator>
OutputIterator operator() ( unsigned size_1,
InputIterator1 begin_1,
InputIterator1 end_1,
unsigned size_2,
InputIterator2 begin_2,
InputIterator2 end_2,
OutputIterator out )
inline

Same as before, but input is coordinates.

◆ print_transform_matrix()

template<class FT>
void print_transform_matrix ( ) const
inline

Print the matrix.

◆ set_weights()

template<class FT = double>
void set_weights ( std::vector< double > weights)
inline

Initialize the weights (for weighted version)

◆ transform() [1/4]

template<class FT>
template<class PointContainer, class OutputIterator>
OutputIterator transform ( const PointContainer & points,
const Point_3 & ref_centroid,
OutputIterator out ) const
inline

Make the rigid registration of the input points w.r.t the internal transformation and the given centroid, and output the transformed points.

◆ transform() [2/4]

template<class FT>
template<class PointContainer, class OutputIterator>
OutputIterator transform ( const PointContainer & points,
OutputIterator out ) const
inline

Make the rigid registration of the input points w.r.t the internal transformation, and output the transformed points.

◆ transform() [3/4]

template<class FT>
template<class InputIterator, class OutputIterator>
OutputIterator transform ( InputIterator begin,
InputIterator end,
OutputIterator out ) const
inline

Same as before, but points are represented by input iterators.

◆ transform() [4/4]

template<class FT>
template<class InputIterator, class OutputIterator>
OutputIterator transform ( unsigned size,
InputIterator begin,
InputIterator end,
OutputIterator out ) const
inline

Same as before, but input and output are coordinates.