Changeset 7054


Ignore:
Timestamp:
10/08/10 16:23:17 (9 years ago)
Author:
melissa
Message:

Reverted r7018, see #570.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/components/loci-plugins/src/loci/plugins/in/Calibrator.java

    r7018 r7054  
    7474    if (td != null) tcal = td.floatValue(); 
    7575 
    76     double xPosition = Double.NaN; 
    77     double yPosition = Double.NaN; 
    78     double zPosition = Double.NaN; 
    79     if (meta.getPlaneCount(series) > 0) { 
    80       Double posX = meta.getPlanePositionX(series, 0); 
    81       Double posY = meta.getPlanePositionY(series, 0); 
    82       Double posZ = meta.getPlanePositionZ(series, 0); 
    83       if (posX != null) xPosition = posX.doubleValue(); 
    84       if (posY != null) yPosition = posY.doubleValue(); 
    85       if (posZ != null) zPosition = posZ.doubleValue(); 
    86     } 
    87  
    8876    boolean xcalPresent = !Double.isNaN(xcal); 
    8977    boolean ycalPresent = !Double.isNaN(ycal); 
     
    10593    tcalPresent = !Double.isNaN(tcal); 
    10694    final boolean hasSpatial = xcalPresent || ycalPresent || zcalPresent; 
    107     final boolean hasStageData = 
    108       !Double.isNaN(xPosition) || !Double.isNaN(yPosition); 
    109     final boolean hasCalibration = hasSpatial || ycalPresent || hasStageData; 
     95    final boolean hasCalibration = hasSpatial || ycalPresent; 
    11096 
    11197    if (hasCalibration) { 
     
    117103      if (zcalPresent) cal.pixelDepth = zcal; 
    118104      if (tcalPresent) cal.frameInterval = tcal; 
    119       if (!Double.isNaN(xPosition) && xcalPresent) { 
    120         cal.xOrigin = xPosition * (1 / xcal); 
    121       } 
    122       if (!Double.isNaN(yPosition) && ycalPresent) { 
    123         cal.yOrigin = yPosition * (1 / ycal); 
    124       } 
    125       if (!Double.isNaN(zPosition) && zcalPresent) { 
    126         cal.zOrigin = zPosition * (1 / zcal); 
    127       } 
    128105      imp.setCalibration(cal); 
    129106    } 
Note: See TracChangeset for help on using the changeset viewer.