I'm new to java so please forgive me if this is a stupid question!
I'm writing a plugin relevant to my project to help me learn java/writing plugins for image analysis, and essentially want to restrict the measurements I'm taking to ROIs/Overlays, but am not entirely sure how to go about this.
The first step I have at the moment is creating a float array to store pixel values like so:
float[] pixels = new float[width * height * nChannels * nSlices * nFrames];
(with following steps to accomodate stacks, multiple channels etc.).
So far it's worked well for what I'm trying to do, but I'm not sure how to adapt this to include/work from ROIs rather than the whole image. The plugin is meant to pull out different types of values from control images (e.g. mean, maxima, medians etc).
Any suggestions? Help would be appreciated! Thanks!