Closed Guiandreis closed 2 years ago
I'm not terribly familliar with scikit-image's calculation of GLCM, but have you looked into how scikit-image defines the neighbors? The fact that you have to input something like pi into the call makes me wonder if scikit image uses a euclidean norm for the distance function (resampling intensities not at right angles to the center voxel). PyRadiomics uses infinity norm, and does not resample voxels to get neighbor values.
in addition, are you sure you defined your angles correctly? [0,np.pi/4,np.pi,3*np.pi/4]
probably overlaps angle 0 and np.pi
(in degrees, this is [0, 45, 180, 135]
, my suggestion would be [0,np.pi/4,np.pi/2,3*np.pi/4]
to also include angle 90.
Hi @JoostJM, I'm new at image feature extraction so I'm exploring some open-source python packages available for it. Calculating GLCM using Pyradiomics and Scikit-Image packages provides different results (focusing on contrast and correlation) using the same image and method, could you help me understand if the different results are caused by my code? I think Scikit-Image package is more straight forward to understand but Pyradiomics provides way more final information. I'm using single slice (2D image) of the Brain1 data. Here's my code on Jupyter Notebook: