I do not have a function like that, but you can try extract the co-ocorrence matrix in 3D using the displacement as a 3D function D(x,y,z) instead of just D(x,y) and computing the Haralick descriptors. There is a related paper here you may check out: http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.69.5262&rep=rep1&type=pdf
In Gonzalez and Woods (3rd edition) book, there is a full description of the Co-occurrence matrices, the Haralick features and tips on how to compute it faster.