Calibration cal = imp.getCalibration(); if (cal.scaled()) { boolean unitsMatch = cal.getXUnit().equals(cal.getYUnit()); double cwidth = imp.getWidth()*cal.pixelWidth; double cheight = imp.getHeight()*cal.pixelHeight; } else { s += d2s(cwidth) + " " + cal.getXUnit() + " x " + d2s(cheight) + " " + cal.getYUnit() + " (" + imp.getWidth() + "x" + imp.getHeight() + "); ";
Calibration cal = imp.getCalibration(); if (cal.scaled()) { boolean unitsMatch = cal.getXUnit().equals(cal.getYUnit()); double cwidth = imp.getWidth()*cal.pixelWidth; double cheight = imp.getHeight()*cal.pixelHeight; } else { s += d2s(cwidth) + " " + cal.getXUnit() + " x " + d2s(cheight) + " " + cal.getYUnit() + " (" + imp.getWidth() + "x" + imp.getHeight() + "); ";
jLabelUnits2.setText( lImp.getCalibration().getYUnit() ); jLabelUnits3.setText( lImp.getCalibration().getZUnit() ); Roi roi = lImp.getRoi();
void getStackUnits(Calibration cal) { Variable x = getFirstVariable(); Variable y = getNextVariable(); Variable z = getNextVariable(); Variable t = getNextVariable(); Variable v = getLastVariable(); x.setString(cal.getXUnit()); y.setString(cal.getYUnit()); z.setString(cal.getZUnit()); t.setString(cal.getTimeUnit()); v.setString(cal.getValueUnit()); }
jLabelUnits2.setText( lImp.getCalibration().getYUnit() ); jLabelUnits3.setText( lImp.getCalibration().getZUnit() ); Roi roi = lImp.getRoi();
void getStackUnits(Calibration cal) { Variable x = getFirstVariable(); Variable y = getNextVariable(); Variable z = getNextVariable(); Variable t = getNextVariable(); Variable v = getLastVariable(); x.setString(cal.getXUnit()); y.setString(cal.getYUnit()); z.setString(cal.getZUnit()); t.setString(cal.getTimeUnit()); v.setString(cal.getValueUnit()); }
store.setPixelsPhysicalSizeY(FormatTools.getPhysicalSizeY(cal.pixelHeight, cal.getYUnit()), 0); store.setPixelsPhysicalSizeZ(FormatTools.getPhysicalSizeZ(cal.pixelDepth, cal.getZUnit()), 0); store.setPixelsTimeIncrement(FormatTools.getTime(new Double(cal.frameInterval), cal.getTimeUnit()), 0);
String yUnit = cal.getYUnit(); gd.addStringField("X_unit:", xUnit, 18); gd.addStringField("Y_unit:", yUnit.equals(xUnit) ? SAME_AS_X : yUnit, 18);
String yUnit = cal.getYUnit(); gd.addStringField("X_unit:", xUnit, 18); gd.addStringField("Y_unit:", yUnit.equals(xUnit) ? SAME_AS_X : yUnit, 18);
((LinearAxis) axis).setOrigin(cal.yOrigin); axis.setUnit(cal.getYUnit());