Posted by
Cammer, Michael on
Jun 07, 2017; 1:18am
URL: http://imagej.273.s1.nabble.com/problem-with-Merge-Channels-and-renaming-tp5018849.html
I'm having a problem with renaming an image after using run("Merge Channels..." with ImageJ 1.51o (which according to the update command in the help menu is the daily build) and both Java 1.6 and 1.8.
In the macro below, at the end an image that is not the result of the Merge Channels gets renamed. If the only other wndow open is the original, then the original is renamed.
Help appreciated.
Regards,
Michael
/==================================
macro "Proper Eq of RGB per channel" {
//original = getImageID;
title = getTitle;
run("Duplicate...", "title=temp");
run("Split Channels");
selectWindow("temp (blue)");
run("Enhance Contrast...", "saturated=0 equalize");
selectWindow("temp (green)");
run("Enhance Contrast...", "saturated=0 equalize");
selectWindow("temp (red)");
run("Enhance Contrast...", "saturated=0 equalize");
run("Merge Channels...", "c1=[temp (red)] c2=[temp (green)] c3=[temp (blue)]");
rename("EQ_" + title);
}
_________________________________________
Michael Cammer, Optical Microscopy Specialist
http://ocs.med.nyu.edu/microscopyhttp://microscopynotes.com/Cell: (914) 309-3270
------------------------------------------------------------
This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is proprietary, confidential, and exempt from disclosure under applicable law. Any unauthorized review, use, disclosure, or distribution is prohibited. If you have received this email in error please notify the sender by return email and delete the original message. Please note, the recipient should check this email and any attachments for the presence of viruses. The organization accepts no liability for any damage caused by any virus transmitted by this email.
=================================
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html