Changeset 2285


Ignore:
Timestamp:
02/15/07 19:30:17 (13 years ago)
Author:
chris
Message:

Notebook:
Adding support for multiple pixel thumbnails,
commiting what I know doesn't break the sucker.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/ome/notebook/MetadataPane.java

    r2270 r2285  
    135135  public BufferedImage img, thumb; 
    136136   
     137  public BufferedImage[] images,thumbs; 
     138   
    137139  /** Holds the ImageReader used to open image or null if none used.*/ 
    138140  protected ImageReader reader; 
     141   
     142   
    139143 
    140144  // -- Fields - raw panel -- 
     
    476480        } 
    477481 
    478         int num = reader.getImageCount(id); 
    479         if (num > 0) { 
    480           // get middle image from the file 
    481           img = reader.openImage(id, num / 2); 
    482         } 
    483         else img = null; 
    484         int width = 50, height = 50; 
    485         thumb = ImageTools.scale(img, width, height, false); 
     482        int numSeries = reader.getSeriesCount(id); 
     483        images = new BufferedImage[numSeries+1]; 
     484        thumbs = new BufferedImage[numSeries+1]; 
     485        for(int i = 0; i<=numSeries;i++) { 
     486          int num = reader.getImageCount(id); 
     487          if (num > 0) { 
     488            // get middle image from the file 
     489            img = reader.openImage(id, num / 2); 
     490          } 
     491          else img = null; 
     492          images[i] = img; 
     493          int width = 50, height = 50; 
     494          thumb = ImageTools.scale(img, width, height, false); 
     495          thumbs[i] = thumb; 
     496        } 
    486497        ome = (OMENode) ms.getRoot(); 
    487498         
Note: See TracChangeset for help on using the changeset viewer.