How to sum data points within contour lines/isolines?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
I have a numeric matrix, z, in which each data point represents a single pixel of an image. If I plot a filled contour, I get the image below that defines my regions of interests (cancer cells) very nicely. Is there a method by which I can sum all the raw data points of my matrix within the outer contour line, including those within the lightest-coloured areas? I am hoping to obtain the total signal intensities of each cancer cell, and then the integrated intensity values. Many thanks in advance.

0 Commenti
Risposte (1)
Star Strider
il 20 Mar 2019
Modificato: Star Strider
il 20 Mar 2019
You can certainly get the (x,y) coordinates of the contours, although it takes a bit of code the get the result you likely want. See specifically the documentation section on Custom Line Width (link) and the detailed explanation of the contour matrix in the documentation section for M (link). You will also find the Contour Properties (link) documentation section on 'LevelList' (link) helpful.
EDIT —
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!