Changeset 5655


Ignore:
Timestamp:
10/30/09 10:59:54 (10 years ago)
Author:
melissa
Message:

Only populate Plane attributes if the plane index is smaller than the total number of planes.

File:
1 edited

Legend:

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

    r5625 r5655  
    718718          if (space >= 0) value = value.substring(0, space); 
    719719          try { 
    720             store.setPlaneTimingDeltaT(new Double(value), 0, 0, currentImage); 
     720            if (currentImage < getImageCount()) { 
     721              store.setPlaneTimingDeltaT(new Double(value), 0, 0, currentImage); 
     722            } 
    721723          } 
    722724          catch (NumberFormatException e) { 
     
    762764            } 
    763765 
    764             if (i == 0) store.setStagePositionPositionX(p, 0, 0, currentImage); 
    765             if (i == 1) store.setStagePositionPositionY(p, 0, 0, currentImage); 
    766             if (i == 2) store.setStagePositionPositionZ(p, 0, 0, currentImage); 
     766            if (currentImage < getImageCount()) { 
     767              if (i == 0) { 
     768                store.setStagePositionPositionX(p, 0, 0, currentImage); 
     769              } 
     770              if (i == 1) { 
     771                store.setStagePositionPositionY(p, 0, 0, currentImage); 
     772              } 
     773              if (i == 2) { 
     774                store.setStagePositionPositionZ(p, 0, 0, currentImage); 
     775              } 
     776            } 
    767777          } 
    768778 
Note: See TracChangeset for help on using the changeset viewer.