Changeset 4325


Ignore:
Timestamp:
08/25/08 10:59:08 (12 years ago)
Author:
melissa
Message:

Added option to disable macro recording.

Location:
trunk/loci/plugins
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/plugins/BFVirtualStack.java

    r4324 r4325  
    5757  private boolean colorize; 
    5858  private boolean merge; 
     59  private boolean record; 
    5960 
    6061  // -- Static utility methods -- 
     
    7778 
    7879  public BFVirtualStack(String path, IFormatReader r, boolean colorize, 
    79     boolean merge) throws FormatException, IOException, CacheException 
     80    boolean merge, boolean record) 
     81    throws FormatException, IOException, CacheException 
    8082  { 
    8183    super(getWidth(r, path), getHeight(r, path), null, path); 
     
    8587    this.colorize = colorize; 
    8688    this.merge = merge; 
     89    this.record = record; 
    8790 
    8891    // set up cache 
     
    198201      currentProcessor = new RecordedImageProcessor(ip, currentSlice, pos[1], 
    199202        otherChannels); 
     203      currentProcessor.setDoRecording(record); 
    200204      return currentProcessor; 
    201205    } 
     
    204208      currentSlice = n - 1; 
    205209      currentProcessor = new RecordedImageProcessor(ip, currentSlice); 
     210      currentProcessor.setDoRecording(record); 
    206211      return currentProcessor; 
    207212    } 
  • trunk/loci/plugins/Importer.java

    r4324 r4325  
    462462            ru.setVar("colorize", colorize); 
    463463            ru.setVar("merge", doMerge); 
    464             stackB = (ImageStack) 
    465               ru.exec("stackB = new BFVirtualStack(id, r, colorize, merge)"); 
     464            ru.setVar("record", options.isRecord()); 
     465            stackB = (ImageStack) ru.exec("stackB = new BFVirtualStack(id, " + 
     466              "r, colorize, merge, record)"); 
    466467 
    467468            if (doMerge) { 
  • trunk/loci/plugins/ImporterOptions.java

    r4324 r4325  
    109109  public static final String PREF_AUTOSCALE = "bioformats.autoscale"; 
    110110  public static final String PREF_VIRTUAL = "bioformats.virtual"; 
     111  public static final String PREF_RECORD = "bioformats.record"; 
    111112  public static final String PREF_ALL_SERIES = "bioformats.openAllSeries"; 
    112113 
     
    137138  public static final String LABEL_AUTOSCALE = "Autoscale images"; 
    138139  public static final String LABEL_VIRTUAL = "Use_virtual_stack"; 
     140  public static final String LABEL_RECORD = "Record_modifications_to_virtual_stack"; 
    139141  public static final String LABEL_ALL_SERIES = "Open_all_series"; 
    140142  public static final String LABEL_SWAP = "Swap_dimensions"; 
     
    163165  private Choice mergeChoice; 
    164166  private Checkbox virtualBox; 
     167  private Checkbox recordBox; 
    165168  private Checkbox allSeriesBox; 
    166169  private Checkbox cropBox; 
     
    184187  private boolean autoscale; 
    185188  private boolean virtual; 
     189  private boolean record; 
    186190  private boolean openAllSeries; 
    187191  private boolean swapDimensions; 
     
    220224  public String getMergeOption() { return mergeOption; } 
    221225  public boolean isVirtual() { return virtual; } 
     226  public boolean isRecord() { return record; } 
    222227  public boolean openAllSeries() { return openAllSeries; } 
    223228  public boolean doCrop() { return crop; } 
     
    264269  public void setWindowless(boolean b) { windowless = b; } 
    265270  public void setVirtual(boolean b) { virtual = b; } 
     271  public void setRecord(boolean b) { record = b; } 
    266272  public void setOpenAllSeries(boolean b) { openAllSeries = b; } 
    267273  public void setCrop(boolean b) { crop = b; } 
     
    284290    autoscale = Prefs.get(PREF_AUTOSCALE, true); 
    285291    virtual = Prefs.get(PREF_VIRTUAL, false); 
     292    record = Prefs.get(PREF_RECORD, true); 
    286293    openAllSeries = Prefs.get(PREF_ALL_SERIES, false); 
    287294    swapDimensions = Prefs.get(PREF_SWAP, false); 
     
    311318    Prefs.set(PREF_AUTOSCALE, autoscale); 
    312319    Prefs.set(PREF_VIRTUAL, virtual); 
     320    Prefs.set(PREF_RECORD, record); 
    313321    Prefs.set(PREF_ALL_SERIES, openAllSeries); 
    314322    Prefs.set(PREF_SWAP, swapDimensions); 
     
    361369      autoscale = getMacroValue(arg, LABEL_AUTOSCALE, autoscale); 
    362370      virtual = getMacroValue(arg, LABEL_VIRTUAL, virtual); 
     371      record = getMacroValue(arg, LABEL_RECORD, record); 
    363372      openAllSeries = getMacroValue(arg, LABEL_ALL_SERIES, openAllSeries); 
    364373      swapDimensions = getMacroValue(arg, LABEL_SWAP, swapDimensions); 
     
    572581    gd.addCheckbox(LABEL_AUTOSCALE, autoscale); 
    573582    gd.addCheckbox(LABEL_VIRTUAL, virtual); 
     583    gd.addCheckbox(LABEL_RECORD, record); 
    574584    gd.addCheckbox(LABEL_ALL_SERIES, openAllSeries); 
    575585    gd.addCheckbox(LABEL_SWAP, swapDimensions); 
     
    598608      autoscaleBox = (Checkbox) boxes.get(10); 
    599609      virtualBox = (Checkbox) boxes.get(11); 
    600       allSeriesBox = (Checkbox) boxes.get(12); 
    601       swapBox = (Checkbox) boxes.get(13); 
     610      recordBox = (Checkbox) boxes.get(12); 
     611      allSeriesBox = (Checkbox) boxes.get(13); 
     612      swapBox = (Checkbox) boxes.get(14); 
    602613      for (int i=0; i<boxes.size(); i++) { 
    603614        ((Checkbox) boxes.get(i)).addItemListener(this); 
     
    622633    autoscale = gd.getNextBoolean(); 
    623634    virtual = gd.getNextBoolean(); 
     635    record = gd.getNextBoolean(); 
    624636    openAllSeries = gd.getNextBoolean(); 
    625637    swapDimensions = gd.getNextBoolean(); 
     
    10871099        changed.add(autoscaleBox); 
    10881100      } 
     1101      else { 
     1102        recordBox.setState(false); 
     1103        changed.add(recordBox); 
     1104      } 
    10891105    } 
    10901106    if (changed.size() > 0) flash(changed); 
Note: See TracChangeset for help on using the changeset viewer.