Public Member Functions | Private Member Functions | Private Attributes
mbl_clamped_plate_spline_2d Class Reference

Construct clamped plate spline to map 2D points in unit disk. More...

#include <mbl_clamped_plate_spline_2d.h>

List of all members.

Public Member Functions

 mbl_clamped_plate_spline_2d ()
 Dflt ctor.
virtual ~mbl_clamped_plate_spline_2d ()
 Destructor.
void build (const vcl_vector< vgl_point_2d< double > > &source_pts, const vcl_vector< vgl_point_2d< double > > &dest_pts)
 Sets up internal transformation to map source_pts onto dest_pts.
void set_source_pts (const vcl_vector< vgl_point_2d< double > > &source_pts)
 Define source point positions.
void build (const vcl_vector< vgl_point_2d< double > > &dest_pts)
 Sets up internal transformation to map source_pts onto dest_pts.
vgl_point_2d< double > operator() (double x, double y) const
 Return transformed version of (x,y).
vgl_point_2d< double > operator() (const vgl_point_2d< double > &p) const
 Return transformed version of (x,y).
short version_no () const
 Version number for I/O.
void print_summary (vcl_ostream &os) const
 Print class to os.
void b_write (vsl_b_ostream &bfs) const
 Save class to binary file stream.
void b_read (vsl_b_istream &bfs)
 Load class from binary file stream.
bool operator== (const mbl_clamped_plate_spline_2d &tps) const
 Comparison operator.

Private Member Functions

bool all_in_unit_circle (const vcl_vector< vgl_point_2d< double > > &pts)
 Check that all points are inside unit circle.
void set_params (const vnl_vector< double > &Wx, const vnl_vector< double > &Wy)
 Set parameters from vectors.
void set_up_rhs (vnl_vector< double > &Bx, vnl_vector< double > &By, const vcl_vector< vgl_point_2d< double > > &src_pts, const vcl_vector< vgl_point_2d< double > > &dest_pts)

Private Attributes

vnl_vector< double > Wx_
vnl_vector< double > Wy_
vcl_vector< vgl_point_2d
< double > > 
src_pts_
vnl_matrix< double > L_inv_
 Used to estimate weights in set_source_points().

Detailed Description

Construct clamped plate spline to map 2D points in unit disk.

I.e. does some mapping (x',y') = f(x,y).

Acts only within unit disk. The deformation and its derivatives are zero at the unit circle.

For more details, see "Measuring Geodesic Distances on the Space of Bounded Diffeomorphisms", C.Twining, S.Marsland et.al.

The warp is `guided' by a set of landmarks p(0) .. p(n-1) in the source plane which are to be mapped to a (possibly deformed) set q(0)..q(n-1) in the destination. Thus the mapping is constrained so that f(p(i)) = q(i) for i = 0..n-1. The points are given to the build() function to set up the object.

If one wishes to map a set of source points to multiple target points, use set_source_pts(src_pts); then build(target_pts); for each target set.

Definition at line 34 of file mbl_clamped_plate_spline_2d.h.


Constructor & Destructor Documentation

mbl_clamped_plate_spline_2d::mbl_clamped_plate_spline_2d ( )

Dflt ctor.

Definition at line 26 of file mbl_clamped_plate_spline_2d.cxx.

mbl_clamped_plate_spline_2d::~mbl_clamped_plate_spline_2d ( ) [virtual]

Destructor.

Definition at line 35 of file mbl_clamped_plate_spline_2d.cxx.


Member Function Documentation

bool mbl_clamped_plate_spline_2d::all_in_unit_circle ( const vcl_vector< vgl_point_2d< double > > &  pts) [private]

Check that all points are inside unit circle.

Definition at line 40 of file mbl_clamped_plate_spline_2d.cxx.

void mbl_clamped_plate_spline_2d::b_read ( vsl_b_istream bfs)

Load class from binary file stream.

Definition at line 288 of file mbl_clamped_plate_spline_2d.cxx.

void mbl_clamped_plate_spline_2d::b_write ( vsl_b_ostream bfs) const

Save class to binary file stream.

Definition at line 275 of file mbl_clamped_plate_spline_2d.cxx.

void mbl_clamped_plate_spline_2d::build ( const vcl_vector< vgl_point_2d< double > > &  source_pts,
const vcl_vector< vgl_point_2d< double > > &  dest_pts 
)

Sets up internal transformation to map source_pts onto dest_pts.

Definition at line 139 of file mbl_clamped_plate_spline_2d.cxx.

void mbl_clamped_plate_spline_2d::build ( const vcl_vector< vgl_point_2d< double > > &  dest_pts)

Sets up internal transformation to map source_pts onto dest_pts.

Definition at line 199 of file mbl_clamped_plate_spline_2d.cxx.

vgl_point_2d< double > mbl_clamped_plate_spline_2d::operator() ( double  x,
double  y 
) const

Return transformed version of (x,y).

Definition at line 223 of file mbl_clamped_plate_spline_2d.cxx.

vgl_point_2d<double> mbl_clamped_plate_spline_2d::operator() ( const vgl_point_2d< double > &  p) const [inline]

Return transformed version of (x,y).

Definition at line 79 of file mbl_clamped_plate_spline_2d.h.

bool mbl_clamped_plate_spline_2d::operator== ( const mbl_clamped_plate_spline_2d tps) const

Comparison operator.

Definition at line 310 of file mbl_clamped_plate_spline_2d.cxx.

void mbl_clamped_plate_spline_2d::print_summary ( vcl_ostream &  os) const

Print class to os.

Definition at line 259 of file mbl_clamped_plate_spline_2d.cxx.

void mbl_clamped_plate_spline_2d::set_params ( const vnl_vector< double > &  Wx,
const vnl_vector< double > &  Wy 
) [private]

Set parameters from vectors.

Definition at line 111 of file mbl_clamped_plate_spline_2d.cxx.

void mbl_clamped_plate_spline_2d::set_source_pts ( const vcl_vector< vgl_point_2d< double > > &  source_pts)

Define source point positions.

Performs pre-computations so that build(dest_points) can be called multiple times efficiently

Definition at line 180 of file mbl_clamped_plate_spline_2d.cxx.

void mbl_clamped_plate_spline_2d::set_up_rhs ( vnl_vector< double > &  Bx,
vnl_vector< double > &  By,
const vcl_vector< vgl_point_2d< double > > &  src_pts,
const vcl_vector< vgl_point_2d< double > > &  dest_pts 
) [private]

Definition at line 118 of file mbl_clamped_plate_spline_2d.cxx.

short mbl_clamped_plate_spline_2d::version_no ( ) const

Version number for I/O.

Definition at line 248 of file mbl_clamped_plate_spline_2d.cxx.


Member Data Documentation

Used to estimate weights in set_source_points().

Definition at line 41 of file mbl_clamped_plate_spline_2d.h.

vcl_vector<vgl_point_2d<double> > mbl_clamped_plate_spline_2d::src_pts_ [private]

Definition at line 38 of file mbl_clamped_plate_spline_2d.h.

Definition at line 36 of file mbl_clamped_plate_spline_2d.h.

Definition at line 36 of file mbl_clamped_plate_spline_2d.h.


The documentation for this class was generated from the following files: