Hi everyone,
This is my first post here. First, I want to thank everyone for all the info and troubleshooting available in this forum. It has helped me tremendously to learn some basics of writing macros and automating some basic image analysis.
I’m putting together a small macro to identify lines along some structures and add each to the ROI manager (I’m using “Ridge Detection” from Biomedgroup"). I get this:
I then want to cycle through each ROI (a line) and get a plot profile on a second channel, get some peaks information (I’m using Find Peaks, from BAR) and go on from there.
The problem I’m having is that to transfer the ROI to the second channel I do:
for (j=0 ; j<roiManager("count"); j++) {
roiManager("select", j);
run("Create Mask");
selectWindow("Mask");
run("Create Selection");
run("Make Inverse");
selectWindow("MAX_" + "C1-" + a);
run("Restore Selection");
// and so on with my analysis
}
But, the run(“Create Selection”); command creates a line around the pixels I want to measure, instead of maintaining a line. See below, the image on the left. This is incompatible with the “Plot Profile” function, which requires either a line or a rectangle:
I’ve spent the last couple of days trying to find out how to apply a ROI Line to another channel, without it becoming an area, but I’ve been completely defeated…
Any help is much appreciated.
Thanks!