Changeset 7152 for branches/4.2


Ignore:
Timestamp:
11/04/10 10:26:12 (10 years ago)
Author:
melissa
Message:

Allow .rec extension for MRC files. isThisType(RandomAccessInputStream) is now overridden, so that Perkin Elmer .rec files are not accidentally picked up.

File:
1 edited

Legend:

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

    r7007 r7152  
    5353  // there, according to: http://bio3d.colorado.edu/imod/doc/mrc_format.txt 
    5454 
    55   private static final String[] MRC_SUFFIXES = {"mrc", "st", "ali", "map"}; 
     55  private static final String[] MRC_SUFFIXES = 
     56    {"mrc", "st", "ali", "map", "rec"}; 
    5657 
    5758  private static final int HEADER_SIZE = 1024; 
     
    6970    super("Medical Research Council", MRC_SUFFIXES); 
    7071    domains = new String[] {FormatTools.MEDICAL_DOMAIN, FormatTools.LM_DOMAIN}; 
     72    suffixSufficient = false; 
    7173  } 
    7274 
    7375  // -- IFormatReader API methods -- 
     76 
     77  /** @see loci.formats.IFormatReader#isThisType(RandomAccessInputStream) */ 
     78  public boolean isThisType(RandomAccessInputStream stream) throws IOException { 
     79    return FormatTools.validStream(stream, HEADER_SIZE, false); 
     80  } 
    7481 
    7582  /** 
Note: See TracChangeset for help on using the changeset viewer.