Hi all,
Im trying to set up a macro that automatically assigns either of the RGB colors (according to my specific needs) to the various channels in a confocal-stack (with 3 channels). I can do this perfectly well manually with the Image->Color->Arrange Channels tool, but would like to program it to a macro. Ive tried to manipulate the "run("Arrange Channels...");" command but I dont know if it can do what im looking for. What I want: Assign red to channel 1, green to channel 2, and blue to channel 3, and at a later point leave red at channel 1, move the blue channel to channel 2 and make it green, and move the green (old channel 2) to channel 3 and make it blue. Are there any options embedded in this function that would do such a thing? Or are there any other solutions? I hope anyone can help me! |
Can't check here about arrange channels, but I normally use merge and split
for similar work. The names aways end in different letters after the split (so if(endswith()) is useful). Regards Kenton On 24 May 2014 22:35, MrScientistman2 <[hidden email]> wrote: > Hi all, > > Im trying to set up a macro that automatically assigns either of the RGB > colors (according to my specific needs) to the various channels in a > confocal-stack (with 3 channels). I can do this perfectly well manually > with > the Image->Color->Arrange Channels tool, but would like to program it to a > macro. Ive tried to manipulate the "run("Arrange Channels...");" command > but > I dont know if it can do what im looking for. > > What I want: Assign red to channel 1, green to channel 2, and blue to > channel 3, and at a later point leave red at channel 1, move the blue > channel to channel 2 and make it green, and move the green (old channel 2) > to channel 3 and make it blue. Are there any options embedded in this > function that would do such a thing? Or are there any other solutions? > > I hope anyone can help me! > > > > -- > View this message in context: > http://imagej.1557.x6.nabble.com/Need-help-with-a-macro-for-changing-channels-and-colors-in-the-run-Arrange-Channels-function-tp5007906.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Mr. Scientist
Do you have a reason to actually move the blue to channel 2?? If so using the merge and split like Kenton suggested is probably a good idea. I've been working with some images where I just need to assign a new color to each channel. A simple Macro like this seems to work - Brian Stack.setChannel(1) run("Blue"); Stack.setChannel(2) run("Red"); Stack.setChannel(3) run("Green"); On Sun, May 25, 2014 at 7:54 AM, Kenton Arkill <[hidden email]>wrote: > Can't check here about arrange channels, but I normally use merge and split > for similar work. The names aways end in different letters after the split > (so if(endswith()) is useful). > Regards > Kenton > > > On 24 May 2014 22:35, MrScientistman2 <[hidden email]> wrote: > > > Hi all, > > > > Im trying to set up a macro that automatically assigns either of the RGB > > colors (according to my specific needs) to the various channels in a > > confocal-stack (with 3 channels). I can do this perfectly well manually > > with > > the Image->Color->Arrange Channels tool, but would like to program it to > a > > macro. Ive tried to manipulate the "run("Arrange Channels...");" command > > but > > I dont know if it can do what im looking for. > > > > What I want: Assign red to channel 1, green to channel 2, and blue to > > channel 3, and at a later point leave red at channel 1, move the blue > > channel to channel 2 and make it green, and move the green (old channel > 2) > > to channel 3 and make it blue. Are there any options embedded in this > > function that would do such a thing? Or are there any other solutions? > > > > I hope anyone can help me! > > > > > > > > -- > > View this message in context: > > > http://imagej.1557.x6.nabble.com/Need-help-with-a-macro-for-changing-channels-and-colors-in-the-run-Arrange-Channels-function-tp5007906.html > > Sent from the ImageJ mailing list archive at Nabble.com. > > > > -- > > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html > -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Thanks a bunch guys! This is exactly what I needed. Also, it turned out I didnt need to rearrange the channels (it was for the RG2B plugin).
|
Free forum by Nabble | Edit this page |