Re: Overlap between two Line ROIs
Posted by
Krs5 on
URL: http://imagej.273.s1.nabble.com/Overlap-between-two-Line-ROIs-tp5021246p5021261.html
Dear pduw,
You could try to threshold both images, run an "Analyze Particles...." on the first images and store the ROIs in the ROI manager. Next, use the Image Calculator XOR option to find the difference between the images.
something like:
overlap = 0;
imageCalculator("XOR create", title, title2);
selectWindow("Result of "+title);
for (i = 0; i < roiManager("count"); i++) {
roiManager("Select", i);
run("Histogram");
wait(100);
Plot.getValues(x, y);
print (y[0], y[255]);
if (y[0]>= y[255])
overlap = overlap + 1;
selectWindow("Histogram of Result");
close();
}
print(overlap);
Best wishes
Kees
Dr Ir K.R. Straatman
Advanced Imaging Facility
Centre for Core Biotechnology Services
University of Leicester
www.le.ac.uk/advanced-imaging-facility<
http://www.le.ac.uk/advanced-imaging-facility>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html