- java.lang.Object
-
- ij.plugin.Duplicator
-
- All Implemented Interfaces:
PlugIn,ItemListener,TextListener,EventListener
public class Duplicator extends Object implements PlugIn, TextListener, ItemListener
This plugin implements the Image/Duplicate command.// test script img1 = IJ.getImage(); img2 = new Duplicator().run(img1); //img2 = new Duplicator().run(img1,1,10); img2.show();
-
-
Constructor Summary
Constructors Constructor Description Duplicator()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ImagePluscrop(ImagePlus imp)Returns a copy the current image or stack slice, cropped if there is a selection.static OverlaycropOverlay(Overlay overlay, Rectangle bounds)static voidignoreNextSelection()voiditemStateChanged(ItemEvent e)ImagePlusrun(ImagePlus imp)Returns a copy of the image, stack or hyperstack contained in the specified ImagePlus.ImagePlusrun(ImagePlus imp, int firstSlice, int lastSlice)Returns a new stack containing a subrange of the specified stack.ImagePlusrun(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.voidrun(String arg)This method is called when the plugin is loaded.voidtextValueChanged(TextEvent e)
-
-
-
Method Detail
-
run
public void run(String arg)
Description copied from interface:PlugInThis 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
public ImagePlus run(ImagePlus imp)
Returns a copy of the image, stack or hyperstack contained in the specified ImagePlus.- See Also:
ImagePlus.duplicate()
-
crop
public ImagePlus crop(ImagePlus imp)
Returns a copy the current image or stack slice, cropped if there is a selection.- See Also:
ImagePlus.crop(),ImagePlus.crop(String)
-
run
public ImagePlus run(ImagePlus imp, int firstSlice, int lastSlice)
Returns a new stack containing a subrange of the specified stack.
-
run
public 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.
-
textValueChanged
public void textValueChanged(TextEvent e)
- Specified by:
textValueChangedin interfaceTextListener
-
itemStateChanged
public void itemStateChanged(ItemEvent e)
- Specified by:
itemStateChangedin interfaceItemListener
-
ignoreNextSelection
public static void ignoreNextSelection()
-
-