Changeset 3423


Ignore:
Timestamp:
11/29/07 08:59:15 (12 years ago)
Author:
melissa
Message:

Save pixel sizes directly, instead of retrieving them from the metadata hashtable.

File:
1 edited

Legend:

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

    r3343 r3423  
    4848  private static final int ZEISS_ID = 34412; 
    4949 
     50  // -- Fields -- 
     51 
     52  private double pixelSizeX, pixelSizeY, pixelSizeZ; 
     53 
    5054  // -- Constructor -- 
    5155 
     
    229233      put("ThumbnailY", ras.readInt()); 
    230234 
    231       put("VoxelSizeX", ras.readDouble()); 
    232       put("VoxelSizeY", ras.readDouble()); 
    233       put("VoxelSizeZ", ras.readDouble()); 
     235      pixelSizeX = ras.readDouble(); 
     236      pixelSizeY = ras.readDouble(); 
     237      pixelSizeZ = ras.readDouble(); 
     238 
     239      put("VoxelSizeX", new Double(pixelSizeX)); 
     240      put("VoxelSizeY", new Double(pixelSizeY)); 
     241      put("VoxelSizeZ", new Double(pixelSizeZ)); 
    234242 
    235243      put("OriginX", ras.readDouble()); 
     
    459467    } 
    460468 
    461     Object pixelSizeX = getMeta("VoxelSizeX"); 
    462     Object pixelSizeY = getMeta("VoxelSizeY"); 
    463     Object pixelSizeZ = getMeta("VoxelSizeZ"); 
    464  
    465     Float pixX = new Float(pixelSizeX == null ? "0" : pixelSizeX.toString()); 
    466     Float pixY = new Float(pixelSizeY == null ? "0" : pixelSizeY.toString()); 
    467     Float pixZ = new Float(pixelSizeZ == null ? "0" : pixelSizeZ.toString()); 
     469    Float pixX = new Float((float) pixelSizeX); 
     470    Float pixY = new Float((float) pixelSizeY); 
     471    Float pixZ = new Float((float) pixelSizeZ); 
    468472 
    469473    MetadataStore store = getMetadataStore(); 
Note: See TracChangeset for help on using the changeset viewer.