ij.plugin
public class ChannelArranger extends java.lang.Object implements PlugIn, java.awt.event.TextListener
Constructor and Description |
---|
ChannelArranger() |
Modifier and Type | Method and Description |
---|---|
static ImagePlus |
run(ImagePlus img,
int[] newOrder)
Changes the order of the channels in a hyperstack.
|
void |
run(java.lang.String arg)
This method is called when the plugin is loaded.
|
void |
textValueChanged(java.awt.event.TextEvent e) |
public void run(java.lang.String arg)
PlugIn
public static ImagePlus run(ImagePlus img, int[] newOrder)
img
- source hyperstacknewOrder
- the new channel orderThe 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();
public void textValueChanged(java.awt.event.TextEvent e)
textValueChanged
in interface java.awt.event.TextListener