Changeset 2324


Ignore:
Timestamp:
02/23/07 10:23:28 (13 years ago)
Author:
melissa
Message:

Added thumbnails to series chooser.

File:
1 edited

Legend:

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

    r2306 r2324  
    2727 
    2828import ij.*; 
    29 import ij.gui.GenericDialog; 
     29import ij.gui.*; 
    3030import ij.io.FileInfo; 
    3131import ij.io.OpenDialog; 
     
    420420 
    421421        gd = new GenericDialog("LOCI Bio-Formats Series Options"); 
     422        GridBagLayout gdl = (GridBagLayout) gd.getLayout(); 
     423        GridBagConstraints gbc = new GridBagConstraints(); 
     424 
     425        ImageReader ir = new ImageReader(); 
    422426        for (int i=0; i<seriesCount; i++) { 
    423427          gd.addCheckbox(seriesStrings[i], series[i]); 
    424         } 
     428          ir.setSeries(id, i); 
     429          BufferedImage thumb = ir.openThumbImage(id, 0); 
     430          Panel p = new Panel(); 
     431          ImageCanvas ic = new ImageCanvas(new ImagePlus("", thumb)); 
     432          p.add(ic); 
     433          gbc.gridy = i; 
     434          gbc.gridwidth = GridBagConstraints.REMAINDER; 
     435          gdl.setConstraints(p, gbc); 
     436          gd.setLayout(gdl); 
     437          gd.add(p); 
     438        } 
     439        ir.close(); 
     440        ir = null; 
    425441        addScrollBars(gd); 
    426442        gd.showDialog(); 
Note: See TracChangeset for help on using the changeset viewer.