@@ -90,8 +90,9 @@ namespace pcl
90
90
* \author Radu B. Rusu, Michael Dixon
91
91
* \ingroup registration
92
92
*/
93
- template <typename PointSource, typename PointTarget, typename Scalar = float >
94
- class IterativeClosestPoint : public Registration <PointSource, PointTarget, Scalar>
93
+ template <typename PointSource, typename PointTarget, typename Scalar = float ,
94
+ typename MatrixType = Eigen::Matrix<Scalar,4 ,4 > >
95
+ class IterativeClosestPoint : public Registration <PointSource, PointTarget, Scalar, MatrixType>
95
96
{
96
97
public:
97
98
typedef typename Registration<PointSource, PointTarget, Scalar>::PointCloudSource PointCloudSource;
@@ -105,7 +106,7 @@ namespace pcl
105
106
typedef PointIndices::Ptr PointIndicesPtr;
106
107
typedef PointIndices::ConstPtr PointIndicesConstPtr;
107
108
108
- typedef boost::shared_ptr<IterativeClosestPoint<PointSource, PointTarget, Scalar> > Ptr ;
109
+ typedef boost::shared_ptr<IterativeClosestPoint<PointSource, PointTarget, Scalar, MatrixType > > Ptr ;
109
110
typedef boost::shared_ptr<const IterativeClosestPoint<PointSource, PointTarget, Scalar> > ConstPtr;
110
111
111
112
using Registration<PointSource, PointTarget, Scalar>::reg_name_;
@@ -255,14 +256,14 @@ namespace pcl
255
256
virtual void
256
257
transformCloud (const PointCloudSource &input,
257
258
PointCloudSource &output,
258
- const Matrix4 &transform);
259
+ const MatrixType &transform);
259
260
260
261
/* * \brief Rigid transformation computation method with initial guess.
261
262
* \param output the transformed input point cloud dataset using the rigid transformation found
262
263
* \param guess the initial guess of the transformation to compute
263
264
*/
264
265
virtual void
265
- computeTransformation (PointCloudSource &output, const Matrix4 &guess);
266
+ computeTransformation (PointCloudSource &output, const MatrixType &guess);
266
267
267
268
/* * \brief XYZ fields offset. */
268
269
size_t x_idx_offset_, y_idx_offset_, z_idx_offset_;
@@ -286,20 +287,21 @@ namespace pcl
286
287
* \author Radu B. Rusu
287
288
* \ingroup registration
288
289
*/
289
- template <typename PointSource, typename PointTarget, typename Scalar = float >
290
- class IterativeClosestPointWithNormals : public IterativeClosestPoint <PointSource, PointTarget, Scalar>
290
+ template <typename PointSource, typename PointTarget, typename Scalar = float ,
291
+ typename MatrixType = Eigen::Matrix<Scalar,4 ,4 > >
292
+ class IterativeClosestPointWithNormals : public IterativeClosestPoint <PointSource, PointTarget, Scalar, MatrixType>
291
293
{
292
294
public:
293
- typedef typename IterativeClosestPoint<PointSource, PointTarget, Scalar>::PointCloudSource PointCloudSource;
294
- typedef typename IterativeClosestPoint<PointSource, PointTarget, Scalar>::PointCloudTarget PointCloudTarget;
295
- typedef typename IterativeClosestPoint<PointSource, PointTarget, Scalar>::Matrix4 Matrix4;
295
+ typedef typename IterativeClosestPoint<PointSource, PointTarget, Scalar, MatrixType >::PointCloudSource PointCloudSource;
296
+ typedef typename IterativeClosestPoint<PointSource, PointTarget, Scalar, MatrixType >::PointCloudTarget PointCloudTarget;
297
+ typedef typename IterativeClosestPoint<PointSource, PointTarget, Scalar, MatrixType >::Matrix4 Matrix4;
296
298
297
- using IterativeClosestPoint<PointSource, PointTarget, Scalar>::reg_name_;
298
- using IterativeClosestPoint<PointSource, PointTarget, Scalar>::transformation_estimation_;
299
- using IterativeClosestPoint<PointSource, PointTarget, Scalar>::correspondence_rejectors_;
299
+ using IterativeClosestPoint<PointSource, PointTarget, Scalar, MatrixType >::reg_name_;
300
+ using IterativeClosestPoint<PointSource, PointTarget, Scalar, MatrixType >::transformation_estimation_;
301
+ using IterativeClosestPoint<PointSource, PointTarget, Scalar, MatrixType >::correspondence_rejectors_;
300
302
301
- typedef boost::shared_ptr<IterativeClosestPoint<PointSource, PointTarget, Scalar> > Ptr ;
302
- typedef boost::shared_ptr<const IterativeClosestPoint<PointSource, PointTarget, Scalar> > ConstPtr;
303
+ typedef boost::shared_ptr<IterativeClosestPoint<PointSource, PointTarget, Scalar, MatrixType > > Ptr ;
304
+ typedef boost::shared_ptr<const IterativeClosestPoint<PointSource, PointTarget, Scalar, MatrixType > > ConstPtr;
303
305
304
306
/* * \brief Empty constructor. */
305
307
IterativeClosestPointWithNormals ()
@@ -323,7 +325,7 @@ namespace pcl
323
325
virtual void
324
326
transformCloud (const PointCloudSource &input,
325
327
PointCloudSource &output,
326
- const Matrix4 &transform);
328
+ const MatrixType &transform);
327
329
};
328
330
}
329
331
0 commit comments