Top abstract class “Kernel”, with sub-classes:
Generic method that will use the appropriate reader according to metadata into the HDF5 file readKernel(hdf5file): subclass of Kernel
All that allow to read/write and convert viability kernel data from/to generic hdf5 format
readBarGridKernel(hdf5File): BarGridKernel readRegularGridKernel(hdf5File): RegularGridKernel readIrregularGridKernel(hdf5File): IrregularGridKernel (irregular: set of value for a set of discrete coordinates) readKDTreeKernel(hdf5File): IrregularGridKernel readFunctionBoundaryKernel(hdf5File): FunctionBoundaryKernel
and associates write functions
Reading from an output file of the Patrick Saint-Pierre's software
convertKernelFromHDF5(fromFile, toFormat, toFile) convertKernelToHDF5(fromFile, fromFormat, toFile)
isInsideKernel(Kernel, Point): Boolean
Optional: kernel classes conversion, like BarGrid ↔ RegularGrid ↔ KDTree and BoundaryFunctionGrid → RegularGrid
Topological functions: classical topological functions as on https://locationtech.github.io/jts/javadoc/org/locationtech/jts/algorithm/package-summary.html (from JTS)
erode(Kernel, distance): Kernel dilate(Kernel, distance): Kernel distanceToBoundary(Kernel, Point): distance intersection(Kernel, Kernel): Kernel union(Kernel, Kernel): Kernel difference(Kernel, Kernel): Kernel convexHull(Kernel, Kernel): Kernel
Is there usefull functions for comparing two BoundaryFunctionGrid? If so, it could be interesting to convert a discrete kernel to a BoundaryFunctionGrid for faster or more expressive operations.
Functions for easily compare two (or more) kernels, by using provided topological functions:
commonRatio(Kernel, Kernel): percentage
The underlying topological functions can be used to get the list of interesting points (difference, intersection, …) in any format.
Visualization (2D/3D) for one or more kernel, including results of topological function of:
Thus, we can visualize (with two colors) two kernels for comparing their volume, and their discretization. We can also visualize the difference between these two kernels.
For more than 3 dimensions, we need specific functions for the visualizations (projection, slice, …)
Targeted software are: