Changeset 6558


Ignore:
Timestamp:
06/22/10 17:31:44 (9 years ago)
Author:
curtis
Message:

Use composite mode by default for formerly-indexed images.

Location:
trunk/components/loci-plugins/src/loci/plugins/in
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/loci-plugins/src/loci/plugins/in/Colorizer.java

    r6554 r6558  
    3636import ij.process.LUT; 
    3737 
     38import loci.formats.ChannelFiller; 
    3839import loci.formats.ImageReader; 
    3940import loci.plugins.BF; 
     
    6667    final ImporterOptions options = process.getOptions(); 
    6768    final ImageProcessorReader reader = process.getReader(); 
     69    final ChannelFiller channelFiller = process.getChannelFiller(); 
    6870    final ImageReader imageReader = process.getImageReader(); 
    6971 
     
    9799        // NB: Default color mode behavior depends on the situation. 
    98100        final boolean isRGB = reader.isRGB() || imageReader.isRGB(); 
    99         if (isRGB) { 
     101        if (isRGB || channelFiller.isFilled()) { 
    100102          // NB: The original data had more than one channel per plane 
    101103          // (e.g., RGB image planes), so we use the composite display mode. 
     
    103105          luts = makeLUTs(channelLUTs, true); // preserve original LUTs 
    104106        } 
     107        else if (hasChannelLUT) { 
     108          // NB: The original data had only one channel per plane, 
     109          // but had at least one lookup table defined. We use the color 
     110          // display mode, with missing LUTs as grayscale. 
     111          mode = CompositeImage.COLOR; 
     112          luts = makeLUTs(channelLUTs, false); // preserve original LUTs 
     113        } 
    105114        else { 
    106115          // NB: The original data had only one channel per plane, 
    107           // so we use the grayscale display mode. 
     116          // and had no lookup tables defined, so we use the grayscale mode. 
    108117          mode = CompositeImage.GRAYSCALE; 
    109           if (hasChannelLUT) { 
    110             // NB: The original data had only one channel per plane, 
    111             // but had at least one lookup table defined. We use the color 
    112             // display mode, with missing LUTs as grayscale. 
    113             mode = CompositeImage.COLOR; 
    114             luts = makeLUTs(channelLUTs, false); // preserve original LUTs 
    115           } 
    116           else { 
    117             // NB: The original data had only one channel per plane, 
    118             // and had no lookup tables defined, so we use the grayscale mode. 
    119             mode = CompositeImage.GRAYSCALE; 
    120             luts = null; 
    121           } 
     118          luts = null; 
    122119        } 
    123120      } 
  • trunk/components/loci-plugins/src/loci/plugins/in/ImportProcess.java

    r6554 r6558  
    420420      BF.warn(options.isQuiet(), "index values will be lost: " + getIdName()); 
    421421    } 
    422  
    423422    r = channelSeparator = new ChannelSeparator(r); 
    424423    r = dimensionSwapper = new DimensionSwapper(r); 
Note: See TracChangeset for help on using the changeset viewer.