Changeset 4130


Ignore:
Timestamp:
06/22/08 10:16:54 (11 years ago)
Author:
melissa
Message:

Populate time interval in ImageJ calibration, if possible.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/plugins/Util.java

    r4055 r4130  
    323323    ImagePlus imp, int series) 
    324324  { 
    325     double xcal = Double.NaN, ycal = Double.NaN, zcal = Double.NaN; 
     325    double xcal = Double.NaN, ycal = Double.NaN, zcal = Double.NaN, tcal = Double.NaN; 
    326326 
    327327    Float xf = retrieve.getDimensionsPhysicalSizeX(0, 0); 
     
    331331    Float zf = retrieve.getDimensionsPhysicalSizeZ(0, 0); 
    332332    if (zf != null) zcal = zf.floatValue(); 
    333  
    334     if (xcal == xcal || ycal == ycal || zcal == zcal) { 
     333    Float tf = retrieve.getDimensionsTimeIncrement(0, 0); 
     334    if (tf != null) tcal = tf.floatValue(); 
     335 
     336    if (xcal == xcal || ycal == ycal || zcal == zcal || tcal == tcal) { 
    335337      Calibration cal = new Calibration(); 
    336338      cal.setUnit("micron"); 
     
    338340      cal.pixelHeight = ycal; 
    339341      cal.pixelDepth = zcal; 
     342      cal.frameInterval = tcal; 
    340343      imp.setCalibration(cal); 
    341344    } 
Note: See TracChangeset for help on using the changeset viewer.