Changeset 2607


Ignore:
Timestamp:
04/12/07 13:13:47 (13 years ago)
Author:
melissa
Message:

Fixed pixel size parsing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/formats/in/GatanReader.java

    r2601 r2607  
    221221      pixX = new Float((String) pixelSizes.get(0)); 
    222222    } 
     223    else pixX = new Float(1);  
     224 
    223225    if (pixelSizes.size() > 1) { 
    224226      pixY = new Float((String) pixelSizes.get(1)); 
    225227    } 
     228    else pixY = new Float(1);  
     229     
    226230    if (pixelSizes.size() > 2) { 
    227231      pixZ = new Float((String) pixelSizes.get(2)); 
    228232    } 
     233    else pixZ = new Float(1);  
    229234 
    230235    store.setDimensions(pixX, pixY, pixZ, null, null, null); 
     
    316321            bytesPerPixel = Integer.parseInt(data); 
    317322          } 
    318           else if (labelString.equals("Scale")) { 
     323          else if (labelString.equals("Scale") && !data.equals("1.0") &&  
     324            !data.equals("0.0"))  
     325          { 
    319326            pixelSizes.add(data); 
    320327          } 
Note: See TracChangeset for help on using the changeset viewer.