.append(in).append("\tinfo=\"").append(calibration.info).append("\"\n") .append(in).append("\tvalueUnit=\"").append(calibration.getValueUnit()).append("\"\n") .append(in).append("\ttimeUnit=\"").append(calibration.getTimeUnit()).append("\"\n") .append(in).append("\tunit=\"").append(calibration.getUnit()).append("\"\n") .append(in).append("/>\n")
sb.append("finterval="+cal.frameInterval+"\n"); if (!cal.getTimeUnit().equals("sec")) sb.append("tunit="+cal.getTimeUnit()+"\n");
sb.append("finterval="+cal.frameInterval+"\n"); if (!cal.getTimeUnit().equals("sec")) appendEscapedLine(sb, "tunit="+cal.getTimeUnit()); if (!cal.getYUnit().equals(cal.getUnit())) appendEscapedLine(sb, "yunit="+cal.getYUnit());
sb.append("finterval="+cal.frameInterval+"\n"); if (!cal.getTimeUnit().equals("sec")) appendEscapedLine(sb, "tunit="+cal.getTimeUnit()); if (!cal.getYUnit().equals(cal.getUnit())) appendEscapedLine(sb, "yunit="+cal.getYUnit());
/** * Hook for subclassers: <br> * Creates the TrackMate instance that will be controlled in the GUI. * * @return a new {@link TrackMate} instance. */ protected TrackMate createTrackMate() { /* * Since we are now sure that we will be working on this model with this * settings, we need to pass to the model the units from the settings. */ final String spaceUnits = settings.imp.getCalibration().getXUnit(); final String timeUnits = settings.imp.getCalibration().getTimeUnit(); model.setPhysicalUnits( spaceUnits, timeUnits ); return new TrackMate( model, settings ); }
/** * Hook for subclassers: <br> * Creates the TrackMate instance that will be controlled in the GUI. * * @return a new {@link TrackMate} instance. */ protected TrackMate createTrackMate() { /* * Since we are now sure that we will be working on this model with this * settings, we need to pass to the model the units from the settings. */ final String spaceUnits = settings.imp.getCalibration().getXUnit(); final String timeUnits = settings.imp.getCalibration().getTimeUnit(); model.setPhysicalUnits( spaceUnits, timeUnits ); return new TrackMate( model, settings ); }
/** * Transfers the calibration of an {@link ImagePlus} to another one, * generated from a capture of the first one. Pixels sizes are adapter * depending on the zoom level during capture. * * @param from * the imp to copy from. * @param to * the imp to copy to. */ private void transferCalibration( final ImagePlus from, final ImagePlus to ) { final Calibration fc = from.getCalibration(); final Calibration tc = to.getCalibration(); tc.setUnit( fc.getUnit() ); tc.setTimeUnit( fc.getTimeUnit() ); tc.frameInterval = fc.frameInterval; final double mag = from.getCanvas().getMagnification(); tc.pixelWidth = fc.pixelWidth / mag; tc.pixelHeight = fc.pixelHeight / mag; tc.pixelDepth = fc.pixelDepth; }
stackTrack.setTitle( "Path from " + start + " to " + end ); final Calibration impCal = stackTrack.getCalibration(); impCal.setTimeUnit( settings.imp.getCalibration().getTimeUnit() ); impCal.setUnit( settings.imp.getCalibration().getUnit() ); impCal.pixelWidth = calibration[ 0 ];
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()); }
jLabelUnits4.setText( lImp.getCalibration().getTimeUnit() );
jLabelUnits4.setText( lImp.getCalibration().getTimeUnit() );
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()); }
gd.setInsets(10, 0, 5); double interval = cal.frameInterval; String intervalStr = IJ.d2s(interval, (int)interval==interval?0:2) + " " + cal.getTimeUnit(); gd.addStringField("Frame interval:", intervalStr); String xo = cal.xOrigin==(int)cal.xOrigin?IJ.d2s(cal.xOrigin,0):IJ.d2s(cal.xOrigin,2);
gd.setInsets(10, 0, 5); double interval = cal.frameInterval; String intervalStr = IJ.d2s(interval, (int)interval==interval?0:2) + " " + cal.getTimeUnit(); gd.addStringField("Frame interval:", intervalStr); String xo = cal.xOrigin==(int)cal.xOrigin?IJ.d2s(cal.xOrigin,0):IJ.d2s(cal.xOrigin,2);
if (cal.fps!=0.0) animationRate = cal.fps; else if (cal.frameInterval!=0.0 && cal.getTimeUnit().equals("sec")) animationRate = 1.0/cal.frameInterval; int decimalPlaces = (int)animationRate==animationRate?0:3;
if (cal.fps!=0.0) animationRate = cal.fps; else if (cal.frameInterval!=0.0 && cal.getTimeUnit().equals("sec")) animationRate = 1.0/cal.frameInterval; int decimalPlaces = (int)animationRate==animationRate?0:3;
final float frameInterval = calibration == null || calibration.frameInterval == 0 ? 1 : (float) calibration.frameInterval; final String frameIntervalUnit = calibration == null || "".equals(calibration.getTimeUnit()) ? "" : calibration.getTimeUnit();
if (zeroInterval) c = 1; String timeUnit = zeroInterval?"Frame":"["+cal.getTimeUnit()+"]"; xAxisLabel = timeUnit; } else {
if (zeroInterval) c = 1; String timeUnit = zeroInterval?"Frame":"["+cal.getTimeUnit()+"]"; xAxisLabel = timeUnit; } else {
((LinearAxis) axis).setScale(cal.frameInterval); axis.setUnit(cal.getTimeUnit());