Changeset 7894


Ignore:
Timestamp:
02/23/12 09:46:10 (8 years ago)
Author:
kbriney
Message:

Updated dependencies so that injector can call PrairieReader (or other specific reader) instead of generic tiff reader. Added removeBinData() call to injector so that the XML validates.

Location:
trunk/projects/prairie-ome-tiff
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/projects/prairie-ome-tiff/pom.xml

    r7881 r7894  
    3636      <artifactId>scifio</artifactId> 
    3737      <version>${bio-formats.version}</version> 
     38    </dependency> 
     39    <dependency> 
     40      <groupId>${bio-formats.groupId}</groupId> 
     41      <artifactId>bio-formats</artifactId> 
     42      <version>${bio-formats.version}</version> 
     43      <scope>runtime</scope> 
    3844    </dependency> 
    3945  </dependencies> 
  • trunk/projects/prairie-ome-tiff/src/main/java/loci/apps/prairie/PrairieInjector.java

    r7890 r7894  
    4343import loci.common.RandomAccessInputStream; 
    4444import loci.common.services.ServiceFactory; 
    45 import loci.common.xml.XMLTools; 
    4645import loci.formats.ImageReader; 
    47 import loci.formats.meta.IMetadata; 
     46import loci.formats.ome.OMEXMLMetadata; 
    4847import loci.formats.services.OMEXMLService; 
    4948import loci.formats.tiff.TiffSaver; 
     
    6463 
    6564  public static void main(String[] args) throws Exception { 
    66 args = new String[] { "C:\\Users\\Kristin\\Documents\\Dropbox\\LOCI\\TestingFiles\\15Feb2012\\Test1\\TIFF-001_Cycle001_CurrentSettings_Ch1_000001.tif" }; 
     65args = new String[] { "C:\\Users\\Kristin\\Documents\\Dropbox\\LOCI\\TestingFiles\\23Feb2012\\Test1\\TIFF-001_Cycle001_CurrentSettings_Ch1_000001.tif" }; 
    6766//    System.setProperty("plugins.dir", "C:\\Program Files (x86)\\ImageJ\\plugins"); 
    6867//    new ImageJ(); 
     
    9796 
    9897    // create a metadata store, where info is placed 
    99     IMetadata meta = omexmlService.createOMEXMLMetadata(); 
     98    OMEXMLMetadata meta = omexmlService.createOMEXMLMetadata(); 
    10099 
    101100    // associate that store with the reader 
    102101    reader.setMetadataStore(meta); 
    103102 
    104     //String[] myargs={"C:\\Users\\Kristin\\Documents\\Dropbox\\LOCI\\TestingFiles\\8Feb2012\\TIFF-001_Cycle001_CurrentSettings_Ch1_000001.tif"}; 
     103    //String[] myargs={"C:\\Users\\Kristin\\Documents\\Dropbox\\LOCI\\TestingFiles\\20Feb2012\\TIFF-001_Cycle001_CurrentSettings_Ch1_000001.tif"}; 
    105104     
    106105    // parse the Prairie dataset, populating the metadata store 
     
    137136      meta.setTiffDataFirstC(new NonNegativeInteger(c), 0, tiffDataIndex); 
    138137      meta.setTiffDataFirstZ(new NonNegativeInteger(z), 0, tiffDataIndex); 
    139       meta.setTiffDataFirstT(new NonNegativeInteger(t), 0, tiffDataIndex); 
     138      meta.setTiffDataFirstT(new NonNegativeInteger(t), 0, tiffDataIndex);   
    140139      meta.setUUIDFileName(file, 0, tiffDataIndex); 
    141140      String uuid = "urn:uuid:" + UUID.randomUUID().toString(); 
     
    151150      meta.setUUID(uuids.get(file)); 
    152151 
     152      // remove BinData element 
     153      omexmlService.removeBinData(meta); 
     154       
    153155      // write out the XML to the TIFF 
    154156      String xml = omexmlService.getOMEXML(meta); 
Note: See TracChangeset for help on using the changeset viewer.