Does anyone know a quick and easy way to get stats on a polygon selection?

I'd like support the Measurement Log feature of photoshop in my solution. I'd like to include several calculation data such as pixel count, area, perimeter, rgb, etc.

Any help would be greatly appreciated. |