Fraxinus  18.10
An IGT application
matrixInterpolation.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 #ifndef MATRIXINTERPOLATION_H_
12 #define MATRIXINTERPOLATION_H_
13 
14 #include "org_custusx_usreconstruction_Export.h"
15 
16 #include <vector>
17 #include "vnl/vnl_matrix.h"
18 #include "vnl/vnl_vector.h"
19 typedef vnl_matrix<double> vnl_matrix_double;
20 
22 // Suppose that T(t) is a time-variant 4-by-4 transformation matrix
23 // whos values at certain points, given in the vector DataPoints, are
24 // given in the vector DataValues. This operation, then, interpolates
25 // to find the values of T at the intermediate points given in the
26 // vector InterpolationPoints.
27 //
28 // The interpolated values are found in two different ways depending
29 // on the value of the InterpolationMethod string:
30 // 1. InterpolationMethod == "closest point": In this case, the
31 // value at a given point is set to the value at the nearest
32 // neighboring point with a known value.
33 // 2. InterpolationMethod == "linear": In this case, the rotation
34 // part of the transformation matrix is found using the slerp
35 // (spherical linear interpolation), while the translation part
36 // is found using ordinary linear interpolation.
37 //
38 // Trondheim, 12.01.09.
39 // Lars Eirik B� <larseirik.bo@sintef.no>, SINTEF Technology and Society.
40 cxPluginUSReconstruction_EXPORT std::vector<vnl_matrix_double> matrixInterpolation(
41  vnl_vector<double> DataPoints,
42  std::vector<vnl_matrix_double> DataValues,
43  vnl_vector<double> InterpolationPoints,
44  std::string InterpolationMethod );
45 
46 
47 #endif /* MATRIXINTERPOLATION_H_ */
vnl_matrix< double > vnl_matrix_double
cxPluginUSReconstruction_EXPORT std::vector< vnl_matrix_double > matrixInterpolation(vnl_vector< double > DataPoints, std::vector< vnl_matrix_double > DataValues, vnl_vector< double > InterpolationPoints, std::string InterpolationMethod)
Operation: Interpolate transformation matrices.