http://imagej.273.s1.nabble.com/Saving-image-with-overlay-outline-tp5013646p5013647.html
you can use Image>Overlay>Flatten to to draw the outlines into the image, modifying the pixels. If you save the resulting image, software other then ImageJ (Fiji) will see the outlines, but there is no chance to recover the original pixel value at the position of the outline (you can't hide the outline any more).
> Hello,
>
> I have a program which detects objects in pictures taken with a confocal
> microscope. After using the command "Analyze particles", I wish to save the
> image with the "Overlay outline". I am aware that by opening the processed
> picture with FIJI, the outline is found. But, is it possible to save this
> outline so that it can appear when the picture is not opened with FIFI?
>
> Here is my macro:
> *Get the images needed (command removed)
> list = getFileList(dir1);
> setBatchMode(true);
> for (i=0; i<list.length; i++) {
> showProgress(i+1, list.length);
> open(dir1+list[i]);
> run("8-bit Color", "number=256");
> run("Set Scale...", "distance=0");
> run("Set Measurements...", "area mean feret's redirect=None
> decimal=3");
> run("Auto Threshold", "method=Otsu white");
> setOption("BlackBackground", false);
> run("Make Binary");
> run("Median...", "radius=1");
> run("Analyze Particles...", "size=2000-Infinity
> show=[Overlay Outlines] display exclude include add");
> x1 = getResult("FeretX",i);
> y1 = getResult("FeretY",i);
> length = getResult("Feret",i);
> degrees = getResult("FeretAngle",i);
> if (degrees>90)
> degrees -= 180;
> angle = degrees*PI/180;
> x2 = x1 + (cos(angle)*length);
> y2 = y1 - (sin(angle)*length);
> setColor("green");
> setLineWidth(3);
> drawLine(x1,y1,x2,y2);
> path_1 = dir1+list[i]+"_processed";
> saveAs("TIFF", path_1);
> }
>
>
>
>
> --
> View this message in context:
http://imagej.1557.x6.nabble.com/Saving-image-with-overlay-outline-tp5013646.html> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html