> We have ROIs stored as byte arrays in a postgresql database associated with an image. What I have to do now is
> calculate the area of the ROI and store it back to the database – however I cannot use the ImageStatistics class
> since roi.getImage (once I convert the ROI back from bytes) is null.
> How do I achieve this if I have the image's width/height in cm stored in the database?
Calculating the Area of the ROI can be done by summing over the ROI byte array (this is the area in Pixels). Note that it will be a negative value (pixels inside the ROI are given the value -1).
To calculate a physical area, you will need to know the pixel dimensions of the original image as well as the physical dimensions (so that you can work out the area of 1 pixel and therefore scale up to the area of the ROI)
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html