Changeset 6639


Ignore:
Timestamp:
07/02/10 15:51:01 (9 years ago)
Author:
curtis
Message:

Update autoscale test to check CompositeImage LUT ranges.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/loci-plugins/test/loci/plugins/in/ImporterTest.java

    r6638 r6639  
    897897  private void minMaxTest(ImagePlus imp, long expectedMin, long expectedMax) 
    898898  { 
    899     ImageStack st = imp.getStack(); 
    900     int numSlices = st.getSize(); 
    901     for (int i = 0; i < numSlices; i++) 
    902     { 
    903       ImageProcessor proc = st.getProcessor(i+1); 
    904       assertEquals(expectedMax,proc.getMax(),0.1); 
    905       assertEquals(expectedMin,proc.getMin(),0.1); 
     899    if (imp instanceof CompositeImage) { 
     900      CompositeImage ci = (CompositeImage) imp; 
     901      for (int c = 0; c < ci.getNChannels(); c++) { 
     902        LUT lut = ci.getChannelLut(c + 1); 
     903        assertEquals(expectedMax,lut.max,0.1); 
     904        assertEquals(expectedMin,lut.min,0.1); 
     905      } 
     906    } 
     907    else { 
     908      ImageStack st = imp.getStack(); 
     909      int numSlices = st.getSize(); 
     910      for (int i = 0; i < numSlices; i++) 
     911      { 
     912        ImageProcessor proc = st.getProcessor(i+1); 
     913        assertEquals(expectedMax,proc.getMax(),0.1); 
     914        assertEquals(expectedMin,proc.getMin(),0.1); 
     915      } 
    906916    } 
    907917  } 
Note: See TracChangeset for help on using the changeset viewer.