Changeset 3126 for trunk


Ignore:
Timestamp:
08/31/07 11:37:25 (12 years ago)
Author:
melissa
Message:

For now, attempting to merge/separate indexed images has no effect.

Location:
trunk/loci/formats
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/ChannelMerger.java

    r3046 r3126  
    5050  public boolean canMerge() { 
    5151    int c = getSizeC(); 
    52     return c > 1 && c <= 4 && !reader.isRGB(); 
     52    return c > 1 && c <= 4 && !reader.isRGB() && !reader.isIndexed(); 
    5353  } 
    5454 
  • trunk/loci/formats/ChannelSeparator.java

    r3015 r3126  
    8383  public int getImageCount() { 
    8484    FormatTools.assertId(getCurrentFile(), true, 2); 
    85     return reader.isRGB() ? 
     85    return (reader.isRGB() && !reader.isIndexed()) ? 
    8686      (getSizeC() / reader.getEffectiveSizeC()) * reader.getImageCount() : 
    8787      reader.getImageCount(); 
     
    9292    FormatTools.assertId(getCurrentFile(), true, 2); 
    9393    String order = super.getDimensionOrder(); 
    94     if (reader.isRGB()) { 
     94    if (reader.isRGB() && !reader.isIndexed()) { 
    9595      String newOrder = "XYC"; 
    9696      if (order.indexOf("Z") > order.indexOf("T")) newOrder += "TZ"; 
     
    113113      throw new FormatException("Invalid image number: " + no); 
    114114    } 
     115 
     116    if (isIndexed()) return reader.openImage(no); 
    115117 
    116118    int bytes = FormatTools.getBytesPerPixel(getPixelType()); 
     
    139141    } 
    140142 
    141     if (reader.isRGB()) { 
     143    if (reader.isRGB() && !reader.isIndexed()) { 
    142144      int c = getSizeC() / reader.getEffectiveSizeC(); 
    143145      int source = no / c; 
Note: See TracChangeset for help on using the changeset viewer.