I am relatively new to ImageJ/Fiji- my apologies for anything that is unclear.
I’ve been tasked to obtain cell metrics of cells on a striped fluorescent background. To figure out if the cell is on or off the stripe, I have used a multi Otsu thresholding method that produces an image of the cells and an image of the background (and a third image, which I discard). To determine if the cell is on or off the stripes, my idea was to:
- Threshold both images.
- Use “Analyze Particles” on the cell image to add the cells to the ROI manager.
- Use getContainedPoints() to obtain a list of pixels for each cell.
- For each cell, select those pixels in the background image using makeSelection().
- Use the getValue() function to determine the mode of the region- if those pixels are mostly black (off stripe) or white (on stripe).
Step 4 is the one I am having issues with. When using the makeSelection() function, it goes to the background image and makes the selection white regardless of if it was black or white originally. I want to select the region but keep the color of the original background image.
If anybody has any ideas on how to make this selection without changing the color of the region on the background image, or even ideas on how to determine what part of the background the cell is on in general, I would appreciate it!