[ITK] [ITK-users] ITK GLCM Matrix

Timothee Evain tevain at telecom-paristech.fr
Mon Oct 17 09:25:16 EDT 2016


You can refer to the description of the filter which is quite complete [1] and to the wiki example for the global structure [2] (even if the example mimic the full process to feature image as in the ScalarImageToTextureFeaturesFilter case, look to the lines concerning the "glcmGenerator").
After setting-up and updating the filter, the ->GetOutput() method will return the GLCM matrix, in the form of an itk Histogram [3].
Basically you could acces to each element through the ->GetFrequency (const IndexType &index) method where the "index" is an itk Index containing the line/row indexes to acces.

HTH,

Tim 


[1]https://itk.org/Doxygen/html/classitk_1_1Statistics_1_1ScalarImageToCooccurrenceMatrixFilter.html
[2]https://itk.org/Wiki/ITK/Examples/Statistics/TextureFeatures
[3]https://itk.org/Doxygen/html/classitk_1_1Statistics_1_1Histogram.html

----- Mail original -----
De: "Taman Upadhaya" <tamanupadhaya at gmail.com>
À: "Timothee Evain" <tevain at telecom-paristech.fr>
Envoyé: Lundi 17 Octobre 2016 14:52:10
Objet: Re: [ITK] [ITK-users] ITK GLCM Matrix

Hi Tim,

First of all thank you for your reply.
Can you direct me to the piece of code to do that.
I am still new to ITK.

Thanks

On Mon, Oct 17, 2016 at 2:50 PM, Timothee Evain <tevain at telecom-paristech.fr
> wrote:

> Hi,
>
> If you want to access directly to the matrix, I would suggest to use the
> Statistics::ScalarImageToCooccurrenceMatrixFilter, which output what you
> want as a histogram.
>
> HTH,
>
> Tim
>
> ----- Mail original -----
> De: "Tmn" <tamanupadhaya at gmail.com>
> À: insight-users at itk.org
> Envoyé: Lundi 17 Octobre 2016 14:35:23
> Objet: [ITK] [ITK-users] ITK GLCM Matrix
>
> I am using itk library to extract Haralick texture feature using
> itk::Statistics::ScalarImageToTextureFeaturesFilter<>; But I am unable to
> find the function to print GLCM matrix.
>
> Can someone please provide me a small example on how to print the GLCM
> matrix?
>
> Thank you for your time!
>
>
>
> --
> View this message in context: http://itk-insight-users.
> 2283740.n2.nabble.com/ITK-GLCM-Matrix-tp7589370.html
> Sent from the ITK Insight Users mailing list archive at Nabble.com.
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>


More information about the Community mailing list