I am trying to find a way to delete multiple ROIs based on a greyscale brightness value contained within a given ROI.
I use a Voronoi tessellation to define ROIs by inverting the selected pattern and superimposing it onto another image. The ROIs are added to the ROI manager and split to give an individual ROI for each tile outlined by the Voronoi pattern. I then extract the histogram for each individual ROI and analyse this further in Excel.
What I’d like to do as a next step is delete all ROIs that do not contain any pixels of a particular brightness (in my case 240). Doing this manually would involve going through up to 20,000 ROIs, and the listed coordinates in the ROI manager do not quite correspond to those in the results file (“through ROI manager -> Measure”), making the job quite difficult. The ultimate goal is to save the remaining ROIs into an overlay, dump all the information not contained within, and repeat the superimposing step with a finer Voronoi pattern to analyse pixel composition of the individual tiles. I cannot just use a threshold function to select the pixels I want as I need the entire tile containing a pixel of the selected brightness.
I found
this topic on the mailing list, and wondered whether it was possible to adjust this Javascript to make it work for what I’m trying to achieve, I just don’t know how to as my coding knowledge is too limited.
Thanks in advance for your help!