Changeset 4798


Ignore:
Timestamp:
02/10/09 22:22:22 (11 years ago)
Author:
melissa
Message:

Only link a LightSource to an Image if LightSource/LightSourceSettings attributes are populated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/bio-formats/src/loci/formats/in/MetamorphReader.java

    r4769 r4798  
    416416        store.setPlaneTimingExposureTime(exposureTime, 0, 0, i); 
    417417      } 
    418       if (i < stageX.length) { 
     418      if (stageX != null && i < stageX.length) { 
    419419        store.setStagePositionPositionX(new Float((float) stageX[i]), 0, 0, i); 
    420420      } 
    421       if (i < stageY.length) { 
     421      if (stageY != null && i < stageY.length) { 
    422422        store.setStagePositionPositionY(new Float((float) stageY[i]), 0, 0, i); 
    423423      } 
     
    447447      store.setDetectorSettingsDetector("Detector:0", 0, i); 
    448448 
    449  
    450       // link LightSource to Image 
    451       store.setLightSourceID("LightSource:" + i, 0, i); 
    452       store.setLightSourceSettingsLightSource("LightSource:" + i, 0, i); 
    453  
    454449      int index = getIndex(0, i, 0); 
    455450      if (index < wave.length && (int) wave[index] >= 1) { 
    456451        store.setLightSourceSettingsWavelength( 
    457452          new Integer((int) wave[index]), 0, i); 
     453 
     454        // link LightSource to Image 
     455        store.setLightSourceID("LightSource:" + i, 0, i); 
     456        store.setLightSourceSettingsLightSource("LightSource:" + i, 0, i); 
    458457      } 
    459458    } 
Note: See TracChangeset for help on using the changeset viewer.