Package ij.plugin
Class ChannelArranger
java.lang.Object
ij.plugin.ChannelArranger
- All Implemented Interfaces:
PlugIn
,TextListener
,EventListener
public class ChannelArranger extends Object implements PlugIn, TextListener
This plugin implements the Image/Colors/Arrange Channels command,
which allows the user to change the order of channels.
- Author:
- Norbert Vischer
23-sep-2012
-
Constructor Summary
Constructors Constructor Description ChannelArranger()
-
Method Summary
-
Constructor Details
-
ChannelArranger
public ChannelArranger()
-
-
Method Details
-
run
Description copied from interface:PlugIn
This method is called when the plugin is loaded. 'arg', which may be blank, is the argument specified for this plugin in IJ_Props.txt. -
run
Changes the order of the channels in a hyperstack.- Parameters:
img
- source hyperstacknewOrder
- the new channel order- Returns:
- a hyperstack with channels in the specified order
The following example opens the FluorescentCells sample image and reverses the order of the channels.
ImagePlus img = IJ.openImage("http://imagej.nih.gov/ij/images/FluorescentCells.zip"); int[] order = {3,2,1}; ImagePlus img2 = ChannelArranger.run(img, order); img2.setDisplayMode(IJ.COLOR); img2.show();
-
textValueChanged
- Specified by:
textValueChanged
in interfaceTextListener
-