Changeset 6972


Ignore:
Timestamp:
09/22/10 10:55:45 (9 years ago)
Author:
melissa
Message:

Only apply LUTs to sliced stacks if the original CompositeImage used the 'Color' display mode. This is because CompositeImage.getChannelLut(...) will return a color LUT even if the display mode is 'Grayscale'.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2/components/loci-plugins/src/loci/plugins/Slicer.java

    r6669 r6972  
    110110 
    111111      if (imp.isComposite()) { 
    112         LUT lut = ((CompositeImage) imp).getChannelLut(zct[1] + 1); 
    113         newStacks[i].setColorModel(lut); 
     112        CompositeImage composite = (CompositeImage) imp; 
     113        if (composite.getMode() == CompositeImage.COLOR) { 
     114          LUT lut = composite.getChannelLut(zct[1] + 1); 
     115          newStacks[i].setColorModel(lut); 
     116        } 
    114117      } 
    115118 
  • trunk/components/loci-plugins/src/loci/plugins/Slicer.java

    r6881 r6972  
    110110 
    111111      if (imp.isComposite()) { 
    112         LUT lut = ((CompositeImage) imp).getChannelLut(zct[1] + 1); 
    113         newStacks[i].setColorModel(lut); 
     112        CompositeImage composite = (CompositeImage) imp; 
     113        if (composite.getMode() == CompositeImage.COLOR) { 
     114          LUT lut = composite.getChannelLut(zct[1] + 1); 
     115          newStacks[i].setColorModel(lut); 
     116        } 
    114117      } 
    115118 
Note: See TracChangeset for help on using the changeset viewer.