Outils pour utilisateurs

Outils du site


API Specifications

Top abstract class “Kernel”, with sub-classes:

  1. BarGridKernel
  2. RegularGridKernel
  3. IrregularGridKernel
  4. FunctionBoundaryGridKernel


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

Formats conversion utilities

Reading from an output file of the Patrick Saint-Pierre's software

readBarGridKernel(pspFile): BarGridKernel

More generally:

convertKernelFromHDF5(fromFile, toFormat, toFile)
convertKernelToHDF5(fromFile, fromFormat, toFile)

General kernel manipulations

isInsideKernel(Kernel, Point): Boolean

Optional: kernel classes conversion, like BarGrid ↔ RegularGrid ↔ KDTree and BoundaryFunctionGrid → RegularGrid

Mathematical operations

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:

  • the points inside
  • the points on the boundary
  • the mesh of the boundary

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:

  • D3.js and 3D library (three.js, …) for integration in the web portal
  • Paraview for advanced functions if webgl functions are not enough
apispecifications.txt · Dernière modification: 2021/03/23 14:44 par simon.murail@iscpif.fr