Changeset 6406


Ignore:
Timestamp:
05/27/10 11:40:03 (9 years ago)
Author:
melissa
Message:

Updated several TIFF-based readers to populate Image.Description more sanely. See  omero:2395.

Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2/components/bio-formats/src/loci/formats/in/GelReader.java

    r6230 r6406  
    195195 
    196196    if (getMetadataOptions().getMetadataLevel() == MetadataLevel.ALL) { 
    197       store.setImageDescription(info, 0); 
    198197      Double pixelSize = new Double(scale.doubleValue()); 
    199198      store.setPixelsPhysicalSizeX(pixelSize, 0); 
  • branches/4.2/components/bio-formats/src/loci/formats/in/ImprovisionTiffReader.java

    r6230 r6406  
    227227        } 
    228228      } 
     229      store.setImageDescription("", 0); 
    229230    } 
    230231  } 
  • branches/4.2/components/bio-formats/src/loci/formats/in/SVSReader.java

    r6230 r6406  
    4545 
    4646  private float[] pixelSize; 
     47  private String[] comments; 
    4748 
    4849  // -- Constructor -- 
     
    7475  public void close(boolean fileOnly) throws IOException { 
    7576    super.close(fileOnly); 
    76     if (!fileOnly) pixelSize = null; 
     77    if (!fileOnly) { 
     78      pixelSize = null; 
     79      comments = null; 
     80    } 
    7781  } 
    7882 
     
    8892 
    8993    pixelSize = new float[core.length]; 
     94    comments = new String[core.length]; 
    9095    for (int i=0; i<core.length; i++) { 
    9196      setSeries(i); 
     
    98103        String key, value; 
    99104        for (String line : lines) { 
    100           tokens = line.split("|"); 
     105          tokens = line.split("[|]"); 
    101106          for (String t : tokens) { 
    102             if (t.indexOf("=") == -1) addGlobalMeta("Comment", t); 
     107            if (t.indexOf("=") == -1) { 
     108              addGlobalMeta("Comment", t); 
     109              comments[i] = t; 
     110            } 
    103111            else { 
    104112              key = t.substring(0, t.indexOf("=")).trim(); 
     
    146154    for (int i=0; i<getSeriesCount(); i++) { 
    147155      store.setImageName("Series " + (i + 1), i); 
     156      store.setImageDescription(comments[i], i); 
    148157    } 
    149158  } 
  • trunk/components/bio-formats/src/loci/formats/in/GelReader.java

    r6230 r6406  
    195195 
    196196    if (getMetadataOptions().getMetadataLevel() == MetadataLevel.ALL) { 
    197       store.setImageDescription(info, 0); 
    198197      Double pixelSize = new Double(scale.doubleValue()); 
    199198      store.setPixelsPhysicalSizeX(pixelSize, 0); 
  • trunk/components/bio-formats/src/loci/formats/in/ImprovisionTiffReader.java

    r6230 r6406  
    227227        } 
    228228      } 
     229      store.setImageDescription("", 0); 
    229230    } 
    230231  } 
  • trunk/components/bio-formats/src/loci/formats/in/SVSReader.java

    r6230 r6406  
    4545 
    4646  private float[] pixelSize; 
     47  private String[] comments; 
    4748 
    4849  // -- Constructor -- 
     
    7475  public void close(boolean fileOnly) throws IOException { 
    7576    super.close(fileOnly); 
    76     if (!fileOnly) pixelSize = null; 
     77    if (!fileOnly) { 
     78      pixelSize = null; 
     79      comments = null; 
     80    } 
    7781  } 
    7882 
     
    8892 
    8993    pixelSize = new float[core.length]; 
     94    comments = new String[core.length]; 
    9095    for (int i=0; i<core.length; i++) { 
    9196      setSeries(i); 
     
    98103        String key, value; 
    99104        for (String line : lines) { 
    100           tokens = line.split("|"); 
     105          tokens = line.split("[|]"); 
    101106          for (String t : tokens) { 
    102             if (t.indexOf("=") == -1) addGlobalMeta("Comment", t); 
     107            if (t.indexOf("=") == -1) { 
     108              addGlobalMeta("Comment", t); 
     109              comments[i] = t; 
     110            } 
    103111            else { 
    104112              key = t.substring(0, t.indexOf("=")).trim(); 
     
    146154    for (int i=0; i<getSeriesCount(); i++) { 
    147155      store.setImageName("Series " + (i + 1), i); 
     156      store.setImageDescription(comments[i], i); 
    148157    } 
    149158  } 
Note: See TracChangeset for help on using the changeset viewer.