Login  Register

newimage help

Posted by jpdustin on Aug 20, 2015; 6:52pm
URL: http://imagej.273.s1.nabble.com/newimage-help-tp5014083.html

Hello,

I am very new to ImageJ and writing macros. I've been slowly piecing together a macro to quantify apoptosis and it looks something like this:

macro "full [1]" {
run("RGB Split");
close();
close();
run("Select All");
run("Copy");
newImage("Counts", "8-bit Black", 1300, 1030, 1);
run("Paste");
run("Subtract Background...", "rolling=5");


//run("Threshold...");
setThreshold(56,255);
setOption("BlackBackground", false);
run("Convert to Mask");

run("Watershed");
run("Analyze Particles...", "size=1-100 circularity=0.00-1.00 show=Nothing display clear");

  }

My questions for this macro are:

1) In the newImage line, I want the name to reflect the original image, e.g. I opened the image, image_1331.tif, and want the new image to reflect that automatically but also have it distinguished with "counts" or something.

2) If I wanted the macro to pause at the setThreshold step to allow me to set a different threshold (even a 1x step for a batch process), how would that go? I may not need to do this because I could use an image to determine a threshold for the entire set, then change the settings.

3) I am having the most difficulty getting the results to save automatically (as you can see by not even having any code here). I have tried several google searches and cannot get any of the suggestions to work. Ultimately, I would like it to save to the folder from which the images were opened, reflect the image name with a .xls or .csv extension, and be able to use it to batch process a large number of images.

Any suggestions/help would be great!

Thanks,
JP

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html