The actual algortihm filling the matrices of the various feature classes is programmed into the C-extension of PyRadiomics. In the earliest versions, we did have python implementations, but due to unsatisfactory performance we have since moved to C-only calculation of the matrices.

Depending on your specific aim, there are several possibilities. If you need to influence the process or extract intermediate results, you can revisit the history of the repository, extracting the python implementations of the matrix calucaltion (though this does not support voxel-based radiomics).

Moreover, the python algorithms were slightly different to make optimum use of optimized numpy calls.

However, if you are seeking a conceptual view of how the matrices are filled, I suggest to start with the C-source code included in the repository. Here you have 2 options. Option 1 is to read the current version, which is more complex to allow for voxel-based calculation and to support both 2D and 3D input. Alternatively, you can read the C-extensions of an earlier version, which required 3D input and could therefore have less complex algorithms. The last version of PyRadiomics with this earlier version of the C-extensions can be found here.