Changeset 6664


Ignore:
Timestamp:
07/07/10 20:17:24 (9 years ago)
Author:
melissa
Message:

OMETiffReader.isThisType now checks whether or not the OME-XML block can actually be parsed.

Files:
2 edited

Legend:

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

    r6663 r6664  
    142142    String comment = ifd.getComment(); 
    143143    if (comment == null) return false; 
    144     return comment.trim().endsWith("OME>"); 
     144 
     145    try { 
     146      ServiceFactory factory = new ServiceFactory(); 
     147      OMEXMLService service = factory.getInstance(OMEXMLService.class); 
     148      service.createOMEXMLMetadata(comment.trim()); 
     149      return true; 
     150    } 
     151    catch (DependencyException de) { } 
     152    catch (ServiceException se) { } 
     153    return false; 
    145154  } 
    146155 
  • trunk/components/bio-formats/src/loci/formats/in/OMETiffReader.java

    r6601 r6664  
    142142    String comment = ifd.getComment(); 
    143143    if (comment == null) return false; 
    144     return comment.trim().endsWith("OME>"); 
     144 
     145    try { 
     146      ServiceFactory factory = new ServiceFactory(); 
     147      OMEXMLService service = factory.getInstance(OMEXMLService.class); 
     148      service.createOMEXMLMetadata(comment.trim()); 
     149      return true; 
     150    } 
     151    catch (DependencyException de) { } 
     152    catch (ServiceException se) { } 
     153    return false; 
    145154  } 
    146155 
Note: See TracChangeset for help on using the changeset viewer.