Changeset 3916


Ignore:
Timestamp:
04/11/08 15:55:58 (12 years ago)
Author:
curtis
Message:

Some minor tweaks to the TIFF writing code.

Location:
trunk/loci/formats/out
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/out/OMETiffWriter.java

    r3845 r3916  
    4646    "contains crucial dimensional parameters and other important metadata. " + 
    4747    "Please edit cautiously (if at all), and back up the original data " + 
    48     "before doing so.  For more information, see the OME-TIFF web site: " + 
     48    "before doing so. For more information, see the OME-TIFF web site: " + 
    4949    "http://loci.wisc.edu/ome/ome-tiff.html. -->"; 
    5050 
     
    6969      MetadataRetrieve retrieve = getMetadataRetrieve(); 
    7070      String xml = MetadataTools.getOMEXML(retrieve); 
     71 
     72      // CTR TODO - convert OME-XML to DOM 
     73      // rather than build from string, just dump from retrieve into latest 
     74      // OME-XML metadata store using MetadataTools 
     75 
     76      // inject TiffData elements 
     77      // use DOMUtil.findElementList(String, Document) to get list of Pixels 
     78      // each Pixels corresponds to one series, in order 
     79 
     80      // generate UUID and add to OME element 
     81      // but need a separate UUID for each file's OME element! 
     82      // now all TiffData elements are identical across all files! 
     83      // the ONLY change is the UUID of the root OME element 
     84 
     85      // can we use a file pattern string as the id in the saveImage method? 
     86      // main challenge is that programmer must still provide TiffData tag 
     87      // list indicating which IFDs of which files correspond to which planes. 
     88 
     89      // should we add TiffData as an entity in metadata store? would that 
     90      // work well, or at all? give it more thought 
     91 
     92      // prepend warning comment 
    7193 
    7294      // insert warning comment 
     
    131153      } 
    132154      catch (FormatException exc) { 
    133         IOException io = 
    134           new IOException("Unable to append OME-XML comment"); 
     155        IOException io = new IOException("Unable to append OME-XML comment"); 
    135156        io.initCause(exc); 
    136157        throw io; 
  • trunk/loci/formats/out/TiffWriter.java

    r3796 r3916  
    9999      RandomAccessStream tmp = new RandomAccessStream(currentId); 
    100100      if (tmp.length() == 0) { 
     101        // write TIFF header 
    101102        DataOutputStream dataOut = new DataOutputStream(out); 
    102103        dataOut.writeByte(TiffTools.BIG); 
     
    138139      isBigTiff = (tmp.length() + 2 * plane) >= 4294967296L; 
    139140      if (isBigTiff) { 
    140         throw new FormatException("File is to large.  Call setBigTiff(true)"); 
     141        throw new FormatException("File is too large; call setBigTiff(true)"); 
    141142      } 
    142143      tmp.close(); 
     
    144145 
    145146    // write the image 
    146  
    147147    lastOffset += 
    148148      TiffTools.writeImage(img, ifd, out, lastOffset, last, isBigTiff); 
Note: See TracChangeset for help on using the changeset viewer.