6 import java.awt.image.*;
13 public static final int NOTHING = 0;
14 public static final int FILTER = 1;
15 public static final int TYPE_CONVERSION = 2;
16 public static final int PASTE = 3;
17 public static final int COMPOUND_FILTER = 4;
18 public static final int COMPOUND_FILTER_DONE = 5;
19 public static final int TRANSFORM = 6;
21 private static int whatToUndo = NOTHING;
22 private static int imageID;
23 private static ImageProcessor ipCopy = null;
26 public static void setup(
int what,
ImagePlus imp) {
30 if (what==FILTER && whatToUndo==COMPOUND_FILTER)
32 if (what==COMPOUND_FILTER_DONE) {
33 if (whatToUndo==COMPOUND_FILTER)
38 imageID = imp.
getID();
39 if (what==TYPE_CONVERSION)
41 else if (what==TRANSFORM) {
45 fht =
new FHT((ImageProcessor)fht);
48 }
else if (what==COMPOUND_FILTER) {
51 ipCopy = ip.duplicate();
59 public static void reset() {
60 if (whatToUndo==COMPOUND_FILTER)
70 public static void undo() {
73 if (imageID!=imp.
getID()) {
87 case COMPOUND_FILTER_DONE:
102 Roi roi = imp.getRoi();