diff --git a/libraries/wavemap/include/wavemap/integrator/projection_model/projector_base.h b/libraries/wavemap/include/wavemap/integrator/projection_model/projector_base.h index 4467021f5..69a0379d8 100644 --- a/libraries/wavemap/include/wavemap/integrator/projection_model/projector_base.h +++ b/libraries/wavemap/include/wavemap/integrator/projection_model/projector_base.h @@ -111,11 +111,6 @@ class ProjectorBase { const Transformation3D::RotationMatrix& R_C_W, const Point3D& t_W_C) const = 0; - Vector2D imageToIndexReal(const ImageCoordinates& image_coordinates) const; - const Vector2D& getIndexToImageScaleFactor() const { - return index_to_image_scale_factor_; - } - protected: const Index2D dimensions_; const Vector2D index_to_image_scale_factor_; @@ -125,6 +120,13 @@ class ProjectorBase { const ImageCoordinates min_image_coordinates_; const ImageCoordinates max_image_coordinates_; + + Vector2D imageToIndexReal(const ImageCoordinates& image_coordinates) const; + + // Give test 'imageToNearestIndicesAndOffsets' of gtest test suite + // 'Image2DProjectorTypedTest' access to private methods and members + template + friend class Image2DProjectorTypedTest_imageToNearestIndicesAndOffsets_Test; }; } // namespace wavemap diff --git a/libraries/wavemap/test/src/integrator/projection_model/test_image_projectors.cc b/libraries/wavemap/test/src/integrator/projection_model/test_image_projectors.cc index 39b9fd158..794ccd2ca 100644 --- a/libraries/wavemap/test/src/integrator/projection_model/test_image_projectors.cc +++ b/libraries/wavemap/test/src/integrator/projection_model/test_image_projectors.cc @@ -408,7 +408,7 @@ TYPED_TEST(Image2DProjectorTypedTest, imageToNearestIndicesAndOffsets) { neighbox_idx & 0b10 ? index_upper[1] : index_lower[1]}; const Index2D index_expected = index_rounded.cast(); const Vector2D offset_expected = - projector.getIndexToImageScaleFactor().cwiseProduct(index_rounded - + projector.index_to_image_scale_factor_.cwiseProduct(index_rounded - index_real); EXPECT_EQ(indices(0, neighbox_idx), index_expected[0]);