Changeset 2007


Ignore:
Timestamp:
01/03/07 14:30:54 (13 years ago)
Author:
chris
Message:

Browser:
1) fixed bug that index of image was off by -1
2) fixed indicator bug that subdivided the indicator inaccurately.

Location:
trunk/loci/plugins/browser
Files:
4 edited

Legend:

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

    r1989 r2007  
    5050    cache = someCache; 
    5151    loadList = someLoadList; 
    52     cacheLength = length - 1; 
     52    cacheLength = length; 
    5353    int setRatio = translate(0); 
    5454    repaint(); 
  • trunk/loci/plugins/browser/CustomWindow.java

    r1989 r2007  
    384384      int nSlices = db.numZ * db.numT * db.numC; 
    385385      int currentSlice = imp.getCurrentSlice(); 
    386       if (db.manager != null) currentSlice = db.manager.getSlice(); 
     386      if (db.manager != null) { 
     387        currentSlice = db.manager.getSlice(); 
     388        currentSlice++; 
     389      } 
    387390 
    388391      StringBuffer sb = new StringBuffer(); 
  • trunk/loci/plugins/browser/LociDataBrowser.java

    r1998 r2007  
    171171    String order = null; 
    172172 
    173     if (fStitch != null) { 
    174       try { 
    175         numZ = fStitch.getSizeZ(id); 
    176         if(reader instanceof ChannelMerger) { 
    177           numC = fStitch.getEffectiveSizeC(id); 
    178 //          IJ.showMessage("ChannelMerger Detected!! Size C = " + numC); 
    179         } 
    180         else numC = fStitch.getEffectiveSizeC(id); 
    181         numT = fStitch.getSizeT(id); 
    182         order = fStitch.getDimensionOrder(id); 
    183       } 
    184       catch (Exception exc) { 
    185         if (DEBUG) exc.printStackTrace(); 
    186         exceptionMessage(exc); 
    187         return; 
    188       } 
    189     } 
    190     else { 
    191       try { 
    192         numZ = reader.getSizeZ(id); 
    193         if(reader instanceof ChannelMerger) numC = reader.getEffectiveSizeC(id); 
    194         else numC = reader.getSizeC(id); 
    195         numT = reader.getSizeT(id); 
    196         order = reader.getDimensionOrder(id); 
    197       } 
    198       catch (Exception exc) { 
    199         if (DEBUG) exc.printStackTrace(); 
    200         exceptionMessage(exc); 
    201         return; 
    202       } 
     173    try { 
     174      numZ = reader.getSizeZ(id); 
     175      numC = reader.getEffectiveSizeC(id); 
     176      numT = reader.getSizeT(id); 
     177      order = reader.getDimensionOrder(id); 
     178    } 
     179    catch (Exception exc) { 
     180      if (DEBUG) exc.printStackTrace(); 
     181      exceptionMessage(exc); 
     182      return; 
    203183    } 
    204184 
     
    274254      } 
    275255    } 
     256  } 
     257   
     258  public void toggleMerge() {     
     259    if (reader instanceof ChannelMerger) { 
     260      IFormatReader parent = ((ReaderWrapper)reader).getReader(); 
     261      reader = new ChannelSeparator(parent); 
     262      cw.ow.dispose(); 
     263      cw.dispose(); 
     264      run(""); 
     265    } 
     266    else if(reader instanceof ChannelSeparator) { 
     267      IFormatReader parent = ((ReaderWrapper)reader).getReader(); 
     268      reader = new ChannelMerger(parent); 
     269      cw.ow.dispose(); 
     270      cw.dispose(); 
     271      run(""); 
     272    } 
     273    else throw new RuntimeException("Unsuported reader class: " + reader.getClass().getName()); 
     274  } 
     275   
     276  public boolean isMerged() { 
     277    if (reader instanceof ChannelMerger) return true; 
     278    else return false; 
    276279  } 
    277280 
  • trunk/loci/plugins/browser/OptionsWindow.java

    r1989 r2007  
    6161 
    6262  /** CheckBoxes to control if caching is on or off */ 
    63   private JCheckBox cacheToggle; 
     63  private JCheckBox cacheToggle,mergeCheck; 
    6464 
    6565  /** Spinners for slice storage.*/ 
     
    391391    if(!cw.db.virtual) enableCache(false); 
    392392 
     393    mergeCheck = new JCheckBox("Merge Channels"); 
     394    mergeCheck.setSelected(cw.db.isMerged()); 
     395    mergeCheck.addItemListener(this); 
     396 
    393397    //configure/layout content pane 
    394398    FormLayout lastLayout = new FormLayout( 
    395399      "pref:grow", 
    396       "pref,pref,pref"); 
     400      "pref,pref,pref,pref"); 
    397401    setLayout(lastLayout); 
    398402    CellConstraints ccs = new CellConstraints(); 
     
    842846        } 
    843847      } 
     848      else if (source == mergeCheck) { 
     849        cw.db.toggleMerge(); 
     850      } 
    844851 
    845852      int zState = 0x00,tState = 0x00,cState = 0x00; 
Note: See TracChangeset for help on using the changeset viewer.