public class Duplicator extends Object implements PlugIn, TextListener, ItemListener
// test script img1 = IJ.getImage(); img2 = new Duplicator().run(img1); //img2 = new Duplicator().run(img1,1,10); img2.show();
Constructor and Description |
---|
Duplicator() |
Modifier and Type | Method and Description |
---|---|
ImagePlus |
crop(ImagePlus imp)
Returns a copy the current stack image, cropped if there is a selection.
|
static Overlay |
cropOverlay(Overlay overlay,
Rectangle bounds) |
void |
itemStateChanged(ItemEvent e) |
ImagePlus |
run(ImagePlus imp)
Returns a copy of the image, stack or hyperstack contained in the specified ImagePlus.
|
ImagePlus |
run(ImagePlus imp,
int firstSlice,
int lastSlice)
Returns a new stack containing a subrange of the specified stack.
|
ImagePlus |
run(ImagePlus imp,
int firstC,
int lastC,
int firstZ,
int lastZ,
int firstT,
int lastT)
Returns a new hyperstack containing a possibly reduced version of the input image.
|
void |
run(String arg)
This method is called when the plugin is loaded.
|
void |
textValueChanged(TextEvent e) |
public void run(String arg)
PlugIn
public ImagePlus run(ImagePlus imp)
ImagePlus.duplicate()
public ImagePlus crop(ImagePlus imp)
ImagePlus.crop()
public ImagePlus run(ImagePlus imp, int firstSlice, int lastSlice)
public ImagePlus run(ImagePlus imp, int firstC, int lastC, int firstZ, int lastZ, int firstT, int lastT)
public void textValueChanged(TextEvent e)
textValueChanged
in interface TextListener
public void itemStateChanged(ItemEvent e)
itemStateChanged
in interface ItemListener