If you aren't dedicated to an R specific solution, ImageJ is open source and
does this under Analysis/Binary.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Murray Richardson
Sent: Wednesday, March 12, 2008 12:59 PM
To: r-sig-geo@stat.math.ethz.ch
Subject: [R-sig-Geo] enumerate grid clusters/patches with size of contiguous
cluster

Hello friends,

I am trying to take a binary input grid of patches (connected cells with 
value = 1), and assign to each non-zero cell the total number of pixels 
comprising the patch to which it belongs. 

So for a connected patch of 27 pixels, all cells belonging to that patch 
will have a value of 27.

Just wondering if anyone has any suggestions.  Maybe a function I don't 
know about yet...

Thanks in advance,

Murray Richardson

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to