ij.plugin
Class Duplicator

java.lang.Object
  extended by ij.plugin.Duplicator
All Implemented Interfaces:
PlugIn, java.awt.event.TextListener, java.util.EventListener

public class Duplicator
extends java.lang.Object
implements PlugIn, java.awt.event.TextListener

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
Duplicator()
           
 
Method Summary
static Overlay cropOverlay(Overlay overlay1, java.awt.Rectangle imgBounds)
           
 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(java.lang.String arg)
          This method is called when the plugin is loaded.
 void textValueChanged(java.awt.event.TextEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Duplicator

public Duplicator()
Method Detail

run

public void run(java.lang.String arg)
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.

Specified by:
run in interface PlugIn

run

public ImagePlus run(ImagePlus imp)
Returns a copy of the image, stack or hyperstack contained in the specified ImagePlus.


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.


cropOverlay

public static Overlay cropOverlay(Overlay overlay1,
                                  java.awt.Rectangle imgBounds)

textValueChanged

public void textValueChanged(java.awt.event.TextEvent e)
Specified by:
textValueChanged in interface java.awt.event.TextListener