Changeset 7183


Ignore:
Timestamp:
11/12/10 08:49:42 (9 years ago)
Author:
melissa
Message:

Fixed a couple of bugs in ImageConverter.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2/components/bio-formats/doc/whats-new.txt

    r7182 r7183  
    1 4.2.1 (2010 November 11): 
     14.2.1 (2010 November 12): 
    22* Many, many bug fixes 
    33* Added support for 7 new formats: 
  • branches/4.2/components/bio-formats/src/loci/formats/tools/ImageConverter.java

    r7149 r7183  
    3737import loci.formats.ChannelMerger; 
    3838import loci.formats.ChannelSeparator; 
     39import loci.formats.FilePattern; 
    3940import loci.formats.FileStitcher; 
    4041import loci.formats.FormatException; 
     
    195196    LOGGER.info(in); 
    196197    IFormatReader reader = new ImageReader(); 
    197     if (stitch) reader = new FileStitcher(reader); 
     198    if (stitch) { 
     199      reader = new FileStitcher(reader); 
     200      String pat = FilePattern.findPattern(new Location(in)); 
     201      if (pat != null) in = pat; 
     202    } 
    198203    if (separate) reader = new ChannelSeparator(reader); 
    199204    if (merge) reader = new ChannelMerger(reader); 
     
    217222 
    218223    MetadataStore store = reader.getMetadataStore(); 
    219     IFormatReader base = reader; 
    220  
    221     if (base instanceof ReaderWrapper) { 
    222       base = ((ReaderWrapper) base).unwrap(); 
    223     } 
    224     if (base instanceof FileStitcher) { 
    225       base = ((FileStitcher) base).getReader(); 
    226     } 
    227     if (base instanceof ImageReader) { 
    228       base = ((ImageReader) base).getReader(); 
    229     } 
     224 
    230225    MetadataTools.populatePixels(store, reader, false, false); 
    231226 
  • trunk/components/bio-formats/doc/whats-new.txt

    r7182 r7183  
    1 4.2.1 (2010 November 11): 
     14.2.1 (2010 November 12): 
    22* Many, many bug fixes 
    33* Added support for 7 new formats: 
  • trunk/components/bio-formats/src/loci/formats/tools/ImageConverter.java

    r7149 r7183  
    3737import loci.formats.ChannelMerger; 
    3838import loci.formats.ChannelSeparator; 
     39import loci.formats.FilePattern; 
    3940import loci.formats.FileStitcher; 
    4041import loci.formats.FormatException; 
     
    195196    LOGGER.info(in); 
    196197    IFormatReader reader = new ImageReader(); 
    197     if (stitch) reader = new FileStitcher(reader); 
     198    if (stitch) { 
     199      reader = new FileStitcher(reader); 
     200      String pat = FilePattern.findPattern(new Location(in)); 
     201      if (pat != null) in = pat; 
     202    } 
    198203    if (separate) reader = new ChannelSeparator(reader); 
    199204    if (merge) reader = new ChannelMerger(reader); 
     
    217222 
    218223    MetadataStore store = reader.getMetadataStore(); 
    219     IFormatReader base = reader; 
    220  
    221     if (base instanceof ReaderWrapper) { 
    222       base = ((ReaderWrapper) base).unwrap(); 
    223     } 
    224     if (base instanceof FileStitcher) { 
    225       base = ((FileStitcher) base).getReader(); 
    226     } 
    227     if (base instanceof ImageReader) { 
    228       base = ((ImageReader) base).getReader(); 
    229     } 
     224 
    230225    MetadataTools.populatePixels(store, reader, false, false); 
    231226 
Note: See TracChangeset for help on using the changeset viewer.