Where to find the implementation of the mapping (mapping) using an irregular (non-uniform) 3D LUT-table. Needed for color mapping.

I really do not want to write myself, a bit too much work, as I understand it, you need to do Delaunay tetrahedraling a set of LUT points, then calculate what the input point belongs to (the tetrahedron, the faces between the tetrahedra, the outer face, the outer space behind all the tetrahedrons), then weigh the the points found, and even degenerate cases are considered ....

Maybe someone met ready source in some sort of library. It is desirable in C / C ++, but any language will go.

To avoid possible discrepancies: we are not talking about the usual non-uniform lattice, mapping for which is done by combining two 3 * 1D LUT + 3D LUT mappings, but it is about irregular (for example, stochastic) distribution of voxels / reference points of the 3D LUT. I illustrated in the nested picture. irregular voxel distribution

    0