Changeset 2283


Ignore:
Timestamp:
02/15/07 14:31:59 (13 years ago)
Author:
curtis
Message:

Fix critical OME-TIFF conversion bug (insert required TiffData element).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/utils/ConvertToOmeTiff.java

    r1708 r2283  
    2626      System.out.print("Converting " + id + " to " + outId + " "); 
    2727      int imageCount = reader.getImageCount(id); 
     28      // insert TiffData element into OME-XML 
     29      // currently handles only single series (single Image, single Pixels) 
    2830      String xml = store.dumpXML(); 
     31      int pix = xml.indexOf("<Pixels "); 
     32      int end = xml.indexOf("/>", pix); 
     33      xml = xml.substring(0, end) + 
     34        "><TiffData/></Pixels>" + xml.substring(end + 2); 
     35      // write out image planes 
    2936      for (int j=0; j<imageCount; j++) { 
    3037        BufferedImage plane = reader.openImage(id, j); 
Note: See TracChangeset for help on using the changeset viewer.