Class SmoothingFilterInitializer


  • public class SmoothingFilterInitializer
    extends Object
    An implementation of the vertex valuator that processes the vertices in a Constrained Delaunay Triangulation and applies a low-pass filter over the data.

    Note that this class modifies the index values of the vertices stored in the TIN. It also depends on the modified values as a way of tracking vertices. Therefore, calling applications should not modify these values while the smoothing filter is being used.

    • Constructor Detail

      • SmoothingFilterInitializer

        public SmoothingFilterInitializer​(IIncrementalTin tin,
                                          int nPasses)
        Construct a smoothing filter. Note that this class modifies the index values of the vertices stored in the TIN.

        Important usage note: this constructor modifies the index values of the vertices stored in the TIN. It also depends on the modified values as a way of tracking vertices. Therefore, calling applications should not modify these values while the smoothing filter is being used.

        The vertices belonging to constraints are not smoothed, but are represented with their original values by the smoothing filter.

        Parameters:
        tin - a valid Delaunay Triangulation
        nPasses - the number of passes to perform over the data for smoothing; the more passes, the more the complexity of the data is reduced.
    • Method Detail

      • getTimeToConstructFilter

        public double getTimeToConstructFilter()
        Gets the time required to construct the filter, in milliseconds. Intended for diagnostic and development purposes.
        Returns:
        a value in milliseconds.
      • getConnectedPolygon

        public List<Vertex> getConnectedPolygon​(IQuadEdge e)
        Gets a polygon consisting of edges connected to the specified edge (in effect providing the set of vertices connected to the starting vertex of the specified edge). The polygon is ordered in counterclockwise order.
        Parameters:
        e - the starting edge
        Returns:
        a valid list of edges (some of which may be perimeter or ghost edges).