Changeset 1826


Ignore:
Timestamp:
11/20/06 13:15:09 (13 years ago)
Author:
curtis
Message:

Fix bug in ImarisTiffReader causing all files to return true for isThisType.

Location:
trunk/loci/formats/in
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/in/AndorReader.java

    r1806 r1826  
    9393   */ 
    9494  public boolean isThisType(String name, boolean open) { 
    95     if (!super.isThisType(name, open)) return false; 
     95    if (!super.isThisType(name, open)) return false; // check extension 
    9696 
    9797    // just checking the filename isn't enough to differentiate between 
  • trunk/loci/formats/in/FluoviewReader.java

    r1814 r1826  
    9999   */ 
    100100  public boolean isThisType(String name, boolean open) { 
    101     if (!super.isThisType(name, open)) return false; 
     101    if (!super.isThisType(name, open)) return false; // check extension 
    102102 
    103103    // just checking the filename isn't enough to differentiate between 
  • trunk/loci/formats/in/ImarisReader.java

    r1716 r1826  
    234234  public boolean isThisType(String name, boolean open) { 
    235235    if (!super.isThisType(name, open)) return false; // check extension 
     236    System.out.println("ImarisReader: isThisType(\"" + name + "\", " + open + ")");//TEMP 
    236237    if (!open) return true; // not allowed to check the file contents 
    237238    try { 
  • trunk/loci/formats/in/ImarisTiffReader.java

    r1755 r1826  
    4141  /** Constructs a new Imaris TIFF reader. */ 
    4242  public ImarisTiffReader() { 
    43     super("Imaris 5 (TIFF)", new String[] {"ims"}); 
     43    super("Imaris 5 (TIFF)", "ims"); 
    4444  } 
    4545 
     
    4949  public boolean isThisType(byte[] block) { 
    5050    // adapted from MetamorphReader.isThisType(byte[]) 
    51  
    52     if (block.length < 3) { 
    53       return false; 
    54     } 
     51    if (block.length < 3) return false; 
    5552    if (block.length < 8) { 
    5653      return true; // we have no way of verifying further 
     
    8380  // -- FormatHandler API methods -- 
    8481 
    85   /* @see loci.formats.IFormatHandler#isThisType(String) */ 
    86   public boolean isThisType(String name) { 
    87     return isThisType(name, true); 
    88   } 
    89  
    9082  /** 
    9183   * Checks if the given string is a valid filename for an Imaris TIFF file. 
     
    9486   */ 
    9587  public boolean isThisType(String name, boolean open) { 
    96     String lname = name.toLowerCase(); 
    97     if (lname.endsWith(".ims")) return true; 
     88    if (!super.isThisType(name, open)) return false; // check extension 
    9889 
    9990    // just checking the filename isn't enough to differentiate between 
    100     // Imaris and regular TIFF; open the file and check more thoroughly 
     91    // Andor and regular TIFF; open the file and check more thoroughly 
    10192    return open ? checkBytes(getMappedId(name), 1024) : true; 
    10293  } 
  • trunk/loci/formats/in/OpenlabReader.java

    r1750 r1826  
    104104   */ 
    105105  public boolean isThisType(String name, boolean open) { 
    106     if (super.isThisType(name, open)) return true; 
     106    if (super.isThisType(name, open)) return true; // check extension 
    107107 
    108108    if (open) { 
Note: See TracChangeset for help on using the changeset viewer.