Interface MeshDistances
- All Superinterfaces:
Iterable<FacetDistances>
,Serializable
- All Known Implementing Classes:
MeshDistancesImpl
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 Summary
Modifier and TypeMethodDescriptionvoid
addLayer
(FacetDistancesDecorator layer) Add a new layer (decorates a raw measurement or its top layer)addRawFacetMeasurement
(RawFacetDistances facetDistances) Adds distance measurement for a facet.void
Removes all layersboolean
containsFacet
(MeshFacet meshFacet) Checks whether this measurement includes the given facet.boolean
containsFacets
(Collection<MeshFacet> meshFacets) Checks whether this measurement includes all given facets.TransformsFacetDistance
objects into the map of the lists of distance valuesReturns statistics of all distances.getFacetMeasurement
(MeshFacet meshFacet) Returns decorated distance measurement for the given facet ornull
double
Returns corrected sample standard deviation.Returns statistics of all distances.iterator()
stream()
Returns a stream of all decorated distance measurements (all vertices of all facets).Returns a stream of raw distances (i.e., distances that were measured and are not affected by weights) of all vertices of all facets.Returns a stream of weighted distances (i.e., distances multiplied by their weight) of all vertices of all facets.TransformsFacetDistance
objects into the map of the lists of weightsMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Method Details
-
addRawFacetMeasurement
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
Add a new layer (decorates a raw measurement or its top layer)- Parameters:
layer
- New layer. Must not benull
-
clearLayers
void clearLayers()Removes all layers -
containsFacet
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
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
Returns decorated distance measurement for the given facet ornull
- Parameters:
meshFacet
- required mesh facet- Returns:
- the decorated distance measurement or
null
-
distancesAsMap
TransformsFacetDistance
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
TransformsFacetDistance
objects into the map of the lists of weights- Returns:
- a map of weights for each measured facet (nearest neighbors are omitted)
-
stream
Stream<DistanceRecord> 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
Iterator<FacetDistances> iterator()- Specified by:
iterator
in interfaceIterable<FacetDistances>
-