> The guide points in vdgl are actually more that pairs of doubles. They
> are edgels, which are pairs of doubles with two more doubles for
> gradient and orientation (4 doubles at each point). This is really
> targeted towards use in edge detection.
> The intent of the vsol_digital_curve_2d was to remove the additional
> edge detection information and allow more direct access to underlying
> points while still allowing for the concept of a continuous structure
> via interpolation.
Wouldn't it be better, then, to use a vcl_vector<vgl_point_2d<double> >,
i.e., a light-weight point containing just 2 doubles? Now the points
are really heavy: x, y, bounding_box, tag, id, time_stamp, ref_count.
Smartness is not an issue here since the points are just used internally.
> Currently interpolation is linear, but we would like to find a way to
> abstractly allow a choice of interpolation function without all the
> mess of the extra layers in vdgl.
Then I see a simple option: use vsol_polyline_2d (extended with the
methods interp(), closest_index() and split()) when you need linear
interpolation, and use a new class (vsol_spline_2d or so) when you want
When designing an abstract interpolation interface, you will end up
with something similar to the vdgl_digital_curve layers.
I can understand the need for something "inbetween" vsol_polyline_2d
and vdgl_digital_curve, without the bias towards edge detection.
But I would propose to place such a class in vdgl, which is really
the location for "digital geometry".