|
Hi All,
I'm currently trying to write an extensive code to analyze some image. I have used bits of this code as individual macros before, however it would be much more productive if I could combine them.
My issue is that the chunk of code I will post below only works as an individual macro and not as a sub segment. The code should open up the desired image from the list and allow me to use the cell counter, however, in batch mode the image is closed before I close the "Cell Counter" dialogue box.
So as its own macro, I can use cell counter on one photo at a time, but when the code is put into a larger, more comprehensive macro none of the photos are visible. They seem to open and close immediately, leaving the cell counter tool and the "Cell Counter" dialogue box open. Does anyone have any ideas on how to get around this? If necessary I can provide the entire code, although it is a bit long.
title = "Select Images";
msg = "Select Merged RFP & GFP Photos";
waitForUser(title, msg);
Merged_image_directory = getDirectory("Choose Source Directory ");
Merged_images = getFileList(Merged_image_directory);
for (i=0; i<Merged_images.length; i++){
open(Merged_image_directory+Merged_images[i]);
run("Cell Counter");
title = "Cell Counter";
msg = "Count Cells, click result, record to exterior source, then close this dialogue box";
waitForUser(title, msg);
}
Sincerely,
Ryan McCool
|