Changeset 6822 for branches/4.1


Ignore:
Timestamp:
08/19/10 12:52:15 (10 years ago)
Author:
melissa
Message:

Prevent extra (Logical)Channel objects from being populated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/4.1/components/bio-formats/src/loci/formats/in/LeicaHandler.java

    r6687 r6822  
    653653          MetadataTools.createLSID("Detector", numDatasets, nextChannel); 
    654654 
    655         if (m != null) { 
     655        /* debug */ 
     656        System.out.println("nextChannel = " + nextChannel); 
     657        System.out.println("  channel = " + channel); 
     658        System.out.println("  numChannels = " + numChannels); 
     659        System.out.println("  core.sizeC = " + core.get(numDatasets).sizeC); 
     660        /* end debug */ 
     661 
     662        boolean validChannel = numChannels <= 0 || nextChannel < numChannels; 
     663 
     664        if (m != null && validChannel) { 
    656665          store.setLogicalChannelName(m.dyeName, numDatasets, nextChannel); 
    657666 
     
    674683        } 
    675684 
    676         if (detector != null) { 
     685        if (detector != null && validChannel) { 
    677686          store.setDetectorID(id, numDatasets, nextChannel); 
    678687          store.setDetectorSettingsGain(gain, numDatasets, nextChannel); 
     
    687696        } 
    688697 
    689         if (laser != null && laser.intensity > 0) { 
     698        if (laser != null && laser.intensity > 0 && validChannel) { 
    690699          store.setLightSourceSettingsLightSource(laser.id, numDatasets, 
    691700            nextChannel); 
Note: See TracChangeset for help on using the changeset viewer.