Posted by
PEARSON Matthew on
Jun 07, 2017; 6:35am
URL: http://imagej.273.s1.nabble.com/problem-with-Merge-Channels-and-renaming-tp5018849p5018851.html
Hi Michael,
I think you're right that the active image should be the merge but to get around this you could use selectWindow (); to try to force the merge to be active? I realise this would only be a temporary workaround if it works!
Thanks,
Matt
-------- Original message --------
From: "Cammer, Michael" <
[hidden email]>
Date: 07/06/2017 02:19 (GMT+00:00)
To:
[hidden email]
Subject: problem with Merge Channels and renaming
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--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.htmlThe University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html