Skip to content

Pbs occured while making tutorials

dcoeurjo edited this page Oct 25, 2011 · 2 revisions

Boards

  • a general mode "IntegerPlane" and "HalfIntegerPlane" in Board2D is to do. I would like to be able to write something like: aboard << SetMode("HalfIntegerPlane") << aGridCurve; aboard << SetMode("IntegerPlane") << theIncidentPoints;

  • I failed to use CustomPen to change color and line width because the documentation is not up-to-date.


Estimators

  • the 'init' method of true estimators has an extra parameter (reference to the shape) to put in the constructor
  • remove the bool parameter isClosed and adapt the code so that is works both for classic iterators and circulators
  • concepts to write

Surfaces

  • the extractAllContourPoints4C needs to be modified. It can be renammed as extractAll2DPointsContours (to be consistent with extractAll2DSCellContours). The parameters order has to be the same as the one of extractAll2DSCellContours. The points extraction should be done using the Khalimsky space methods (sKCoords, sKDirectIncident, etc.)

Coding style

  • Do the accessors/getters have to begin with 'get' ? There is upperBound() for the images and domains, but getUpperBound() for the shapes and the Gauss digitizer.

    • DC: I agree. At the beginning of the DGtal history, we came to the idea that if an accessor has got Val a = x.getSomething() it means that some "non-trivial" computations have to be done. In this context, val a = x.something() would mean "direct" access to a value. Anyway, it's fine if we remove that in shapes.

Design

  • models of shape and point predicate need to be unified:

    • all parametric and implicite shapes of the shape factory.
    • GaussDigitizer.
    • shapes like straight line or circle passing through digital points used in geometric algorithms.
    • threshold predicates for images. Proposition:
  • GridCurve is an alternating sequence of 0 and 1-cells. In a n-dimensional space (n>1), it may be more useful to have an alternating sequence of (n-2) and (n-1)-cells. The two definitions are equivalent in 2d but are different for n>2. What is the best ?


Bugs:

  • FP to MLP does not work (ASSERT) in some cases.
  • got negative values when read pgm images (returned by convert) with PNMReader. (Doc for image import/export and extracting iso-contours not up-to-date).