Changeset 2425


Ignore:
Timestamp:
03/12/07 14:06:25 (13 years ago)
Author:
melissa
Message:

First attempt at executing macros on a virtual stack.

Location:
trunk/loci/plugins/browser
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/plugins/browser/CustomWindow.java

    r2424 r2425  
    2727import ij.*; 
    2828import ij.gui.*; 
     29import ij.macro.MacroRunner; 
    2930import ij.measure.Calibration; 
    3031import java.awt.*; 
    3132import java.awt.event.*; 
     33import java.util.Vector; 
    3234import javax.swing.*; 
    3335import javax.swing.event.ChangeEvent; 
     
    341343    if (db.manager != null) { 
    342344      imp.setProcessor(patternTitle, db.manager.getSlice(index - 1)); 
     345      // now execute macros as needed  
     346  
     347      Vector macros = db.macro.getMacros(); 
     348      for (int i=0; i<macros.size(); i++) { 
     349        MacroRunner runner = new MacroRunner((String) macros.get(i)); 
     350      } 
    343351      index = 1; 
    344 //      repaint(); 
    345352      return; 
    346353    } 
     
    356363        "; zSliceSel = " + zSliceSel.getValue() + 
    357364        "; tSliceSel = " + tSliceSel.getValue() + ")"); 
     365    } 
     366   
     367    // now execute macros as needed  
     368  
     369    Vector macros = db.macro.getMacros(); 
     370    for (int i=0; i<macros.size(); i++) { 
     371      MacroRunner runner = new MacroRunner((String) macros.get(i)); 
    358372    } 
    359373    repaint(); 
  • trunk/loci/plugins/browser/LociDataBrowser.java

    r2424 r2425  
    8383  protected CacheManager manager; 
    8484 
     85  /** Macro manager - allows us to perform operations on a virtual stack. */ 
     86  protected MacroManager macro; 
     87 
     88  /** Macro manager thread. */ 
     89  protected Thread macroThread; 
     90 
    8591  /** Series to use in a multi-series file. */ 
    8692  protected int series; 
     
    94100    fStitch = new FileStitcher(); 
    95101    reader = new ChannelSeparator(fStitch); 
     102    macro = new MacroManager(); 
     103    macroThread = new Thread(macro, "MacroRecorder"); 
     104    macroThread.start();  
    96105  } 
    97106 
     
    104113  public LociDataBrowser(boolean merged) { 
    105114    fStitch = new FileStitcher(); 
    106     if(merged) reader = new ChannelMerger(fStitch); 
     115    if (merged) reader = new ChannelMerger(fStitch); 
    107116    else reader = new ChannelSeparator(fStitch); 
    108117  } 
     
    271280 
    272281  public void run(String arg) { 
     282    macro = new MacroManager(); 
     283    macroThread = new Thread(macro, "MacroRecorder"); 
     284    macroThread.start();  
     285     
    273286    LociOpener lociOpener = new LociOpener(); 
    274287    boolean done2 = false; 
Note: See TracChangeset for help on using the changeset viewer.