Hi,
On Tue, 20 Dec 2011, Mohammed Tlais wrote:
> I would like to be directed to some tutorial or samples of how to read
> all the pixels of a ROI.
In fiji-lib.jar there is some generic RoiStatistics class doing that:
http://fiji.sc/RoiStatistics.java (it is more generic than needed by the
class because I needed to subclass it for another project of mine).
Unfortunately, there is a bug at the moment where it does not work
reliably in all the cases but maybe you're lucky.
Short version is to make a mask, use the correct offset (which is the
problem in some circumstances) and then iterate over the pixels inside the
bounding box and test the mask's pixels.
This is more complicated, but also much faster, than using Roi's
contains() method (which Google or at least a basic search through the
Javadocs should have turned up).
Ciao,
Johannes