Interface MeshDistances

All Superinterfaces:
Iterable<FacetDistances>, Serializable
All Known Implementing Classes:
MeshDistancesImpl

public interface MeshDistances extends Iterable<FacetDistances>, Serializable
The result of the surface-to-surface distance measurement (i.e., multiple facets towards multiple facets). The object stores raw distance measurements of multiple facets and allows to decorate them with layers that modify weights of the raw distances based on feature point priorities, masks, etc.
  • Method Details

    • addRawFacetMeasurement

      FacetDistances addRawFacetMeasurement(RawFacetDistances facetDistances)
      Adds distance measurement for a facet. Previous measurement is returned, if exists.
      Parameters:
      facetDistances - facet distance measurement without decorations (layers above).
      Returns:
      previous distance data for the facet or null
    • addLayer

      void addLayer(FacetDistancesDecorator layer)
      Add a new layer (decorates a raw measurement or its top layer)
      Parameters:
      layer - New layer. Must not be null
    • clearLayers

      void clearLayers()
      Removes all layers
    • containsFacet

      boolean containsFacet(MeshFacet meshFacet)
      Checks whether this measurement includes the given facet.
      Parameters:
      meshFacet - mesh facet to be checked
      Returns:
      true if the facet is among the measured facets.
    • containsFacets

      boolean containsFacets(Collection<MeshFacet> meshFacets)
      Checks whether this measurement includes all given facets.
      Parameters:
      meshFacets - mesh facets to be checked
      Returns:
      true if all facets are among the measured facets.
    • getFacetMeasurement

      FacetDistances getFacetMeasurement(MeshFacet meshFacet)
      Returns decorated distance measurement for the given facet or null
      Parameters:
      meshFacet - required mesh facet
      Returns:
      the decorated distance measurement or null
    • distancesAsMap

      Map<MeshFacet,List<Double>> distancesAsMap()
      Transforms FacetDistance objects into the map of the lists of distance values
      Returns:
      a map of distance values for each measured facet (nearest neighbors are omitted)
    • weightsAsMap

      Map<MeshFacet,List<Double>> weightsAsMap()
      Transforms FacetDistance objects into the map of the lists of weights
      Returns:
      a map of weights for each measured facet (nearest neighbors are omitted)
    • stream

      Returns a stream of all decorated distance measurements (all vertices of all facets). The stream includes possible invalid measurements, i.e., point distances with infinite or NaN values, with missing nearing neighbors, etc. Use stream filtering to remove them.
      Returns:
      a stream of all decorated distance measurements (all vertices of all facets)
    • streamOfRawDistances

      DoubleStream streamOfRawDistances()
      Returns a stream of raw distances (i.e., distances that were measured and are not affected by weights) of all vertices of all facets. The stream can include infinite numbers or NaNs values. Use stream filtering to remove them.
      Returns:
      a stream of raw distances
    • streamOfWeightedDistances

      DoubleStream streamOfWeightedDistances()
      Returns a stream of weighted distances (i.e., distances multiplied by their weight) of all vertices of all facets. The stream can include infinite numbers or NaNs values. Use stream filtering to remove them.
      Returns:
      a stream of raw distances
    • getDistanceStats

      DoubleSummaryStatistics getDistanceStats()
      Returns statistics of all distances. Only finite values are taken into account while infinite or NaN values are omitted from the calculation. Weights are ignored!
      Returns:
      statistics of all computed distances.
    • getWeightedStats

      DoubleSummaryStatistics getWeightedStats()
      Returns statistics of all distances. Only finite values are taken into account while infinite or NaN values are omitted from the calculation. The distances are multiplied by weights.
      Returns:
      statistics of all computed distances.
    • getSampleStandardDeviation

      double getSampleStandardDeviation()
      Returns corrected sample standard deviation. Only finite values are taken into account while infinite or NaN values are omitted from the calculation. Weights are ignored!
      Returns:
      corrected sample standard deviation
    • iterator

      Specified by:
      iterator in interface Iterable<FacetDistances>