Changeset 6378


Ignore:
Timestamp:
05/25/10 09:51:55 (9 years ago)
Author:
melissa
Message:

Tweaked MetamorphReader.isThisType so that Prairie TIFFs are not picked up.

Files:
2 edited

Legend:

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

    r6376 r6378  
    128128  public boolean isThisType(RandomAccessInputStream stream) throws IOException { 
    129129    TiffParser tp = new TiffParser(stream); 
    130     tp.setDoCaching(false); 
    131130    IFD ifd = tp.getFirstIFD(); 
    132     if (ifd == null) return false; 
    133     return ifd.containsKey(METAMORPH_ID); 
     131    if (ifd == null || !ifd.containsKey(METAMORPH_ID)) return false; 
     132    String software = ifd.getIFDTextValue(IFD.SOFTWARE); 
     133    return software != null && software.trim().startsWith("Meta"); 
    134134  } 
    135135 
  • trunk/components/bio-formats/src/loci/formats/in/MetamorphReader.java

    r6377 r6378  
    128128  public boolean isThisType(RandomAccessInputStream stream) throws IOException { 
    129129    TiffParser tp = new TiffParser(stream); 
    130     tp.setDoCaching(false); 
    131130    IFD ifd = tp.getFirstIFD(); 
    132     if (ifd == null) return false; 
    133     return ifd.containsKey(METAMORPH_ID); 
     131    if (ifd == null || !ifd.containsKey(METAMORPH_ID)) return false; 
     132    String software = ifd.getIFDTextValue(IFD.SOFTWARE); 
     133    return software != null && software.trim().startsWith("Meta"); 
    134134  } 
    135135 
Note: See TracChangeset for help on using the changeset viewer.