AIM-Harvard / pyradiomics

Open-source python package for the extraction of Radiomics features from 2D and 3D images and binary masks. Support: https://discourse.slicer.org/c/community/radiomics
http://pyradiomics.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
1.11k stars 485 forks source link

[FEAT EXTRACTION] Implementing Haralick Correlation #794

Open mohanadarafe opened 1 year ago

mohanadarafe commented 1 year ago

Hello,

I'd like to implement the following feature which is Haralick Correlation. I'm not sure I understand how to multiply (i,j) by the GLCM matrix. I am assuming it means P_glcm**2 since it is similar to how the joint entropy feature value is computed.

As you see in the figure below, the circled feature is the one I'd like to compute. Meanwhile, inside the GLCMEntropy_AllDirection_offset1's formula, the GLCM matrix is multiplied by the log base 2 of the GLCM matrix (source%2C%20(1%2C%202)))).

Capture

If anyone can provide some insight, it would be helpful for me to develop.

Thank you

JoostJM commented 1 year ago

This feature is already implemented as Correlation.

mohanadarafe commented 1 year ago

This feature is already implemented as Correlation.

Thank you, I got it confused. In that case, is there a way to get a feature at a specific angle? As documentation states:

By default, the value of a feature is calculated on the GLCM for each angle separately, after which the mean of these values is returned.

How can I extract the feature at a specific angle (e.g. 45 degrees) ?