fileInfo.calibrationFunction = calibration.getFunction(); fileInfo.coefficients = calibration.getCoefficients(); fileInfo.valueUnit = calibration.getValueUnit(); fileInfo.frameInterval = calibration.frameInterval;
public void storeCurrentChannelProperties() { final int channel = getCurrentChannel(); storeChannelProperties(channel); // Density calibration properties final ChannelCalibration chCal = chCalibration[channel - 1]; if (getGlobalCalibration() == null) { final Calibration cal = getCalibration(); chCal.setFunction(cal.getFunction(), cal.getCoefficients(), cal .getValueUnit(), cal.zeroClip()); } }
s = cal.getValueUnit(); if (s.equals("Gray Value")) s = "";
s = cal.getValueUnit(); if (s.equals("Gray Value")) s = "";
String s = ""; if (showUnit) s = cal.getValueUnit(); ImageProcessor ipOrig = imp.getProcessor(); double min = ipOrig.getMin();
String s = ""; if (showUnit) s = cal.getValueUnit(); ImageProcessor ipOrig = imp.getProcessor(); double min = ipOrig.getMin();
fi.calibrationFunction = cal.getFunction(); fi.coefficients = cal.getCoefficients(); fi.valueUnit = cal.getValueUnit(); } else if (!Calibration.DEFAULT_VALUE_UNIT.equals(cal.getValueUnit())) fi.valueUnit = cal.getValueUnit();
fi.calibrationFunction = cal.getFunction(); fi.coefficients = cal.getCoefficients(); fi.valueUnit = cal.getValueUnit(); } else if (!Calibration.DEFAULT_VALUE_UNIT.equals(cal.getValueUnit())) fi.valueUnit = cal.getValueUnit();
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()); }
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()); }
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr) { ImageProcessor ip = imp.getProcessor(); ip.resetBinaryThreshold(); // remove any invisible threshold set by Make Binary or Convert to Mask thresholded = ip.getMinThreshold()!=ImageProcessor.NO_THRESHOLD; GenericDialog gd = new GenericDialog(command); int digits = (ip instanceof FloatProcessor)?2:0; String unit = (imp.getCalibration()!=null)?imp.getCalibration().getValueUnit():null; unit = (unit==null||unit.equals("Gray Value"))?":":" ("+unit+"):"; gd.addNumericField("Noise tolerance"+unit,tolerance, digits); gd.addChoice("Output type:", outputTypeNames, outputTypeNames[dialogOutputType]); gd.addCheckbox("Exclude edge maxima", excludeOnEdges); if (thresholded) gd.addCheckbox("Above lower threshold", useMinThreshold); gd.addCheckbox("Light background", lightBackground); gd.addPreviewCheckbox(pfr, "Preview point selection"); gd.addMessage(" "); //space for number of maxima messageArea = (Label)gd.getMessage(); gd.addDialogListener(this); checkboxes = gd.getCheckboxes(); previewing = true; gd.addHelp(IJ.URL+"/docs/menus/process.html#find-maxima"); gd.showDialog(); //input by the user (or macro) happens here if (gd.wasCanceled()) return DONE; previewing = false; if (!dialogItemChanged(gd, null)) //read parameters return DONE; IJ.register(this.getClass()); //protect static class variables (parameters) from garbage collection return flags; } // boolean showDialog
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr) { ImageProcessor ip = imp.getProcessor(); ip.resetBinaryThreshold(); // remove invisible threshold set by MakeBinary and Convert to Mask thresholded = ip.getMinThreshold()!=ImageProcessor.NO_THRESHOLD; GenericDialog gd = new GenericDialog(command); int digits = (ip instanceof FloatProcessor)?2:0; String unit = (imp.getCalibration()!=null)?imp.getCalibration().getValueUnit():null; unit = (unit==null||unit.equals("Gray Value"))?":":" ("+unit+"):"; gd.addNumericField("Noise tolerance"+unit,tolerance, digits); gd.addChoice("Output type:", outputTypeNames, outputTypeNames[dialogOutputType]); gd.addCheckbox("Exclude edge maxima", excludeOnEdges); if (thresholded) gd.addCheckbox("Above lower threshold", useMinThreshold); gd.addCheckbox("Light background", lightBackground); gd.addPreviewCheckbox(pfr, "Preview point selection"); gd.addMessage(" "); //space for number of maxima messageArea = (Label)gd.getMessage(); gd.addDialogListener(this); checkboxes = gd.getCheckboxes(); previewing = true; gd.addHelp(IJ.URL+"/docs/menus/process.html#find-maxima"); gd.showDialog(); //input by the user (or macro) happens here if (gd.wasCanceled()) return DONE; previewing = false; if (!dialogItemChanged(gd, null)) //read parameters return DONE; IJ.register(this.getClass()); //protect static class variables (parameters) from garbage collection return flags; } // boolean showDialog
public int showDialog(ImagePlus imp, String command, PlugInFilterRunner pfr) { ImageProcessor ip = imp.getProcessor(); ip.resetBinaryThreshold(); // remove any invisible threshold set by Make Binary or Convert to Mask thresholded = ip.getMinThreshold()!=ImageProcessor.NO_THRESHOLD; GenericDialog gd = new GenericDialog(command); int digits = (ip instanceof FloatProcessor)?2:0; String unit = (imp.getCalibration()!=null)?imp.getCalibration().getValueUnit():null; unit = (unit==null||unit.equals("Gray Value"))?":":" ("+unit+"):"; gd.addNumericField("Noise tolerance"+unit,tolerance, digits); gd.addChoice("Output type:", outputTypeNames, outputTypeNames[dialogOutputType]); gd.addCheckbox("Exclude edge maxima", excludeOnEdges); if (thresholded) gd.addCheckbox("Above lower threshold", useMinThreshold); gd.addCheckbox("Light background", lightBackground); gd.addPreviewCheckbox(pfr, "Preview point selection"); gd.addMessage(" "); //space for number of maxima messageArea = (Label)gd.getMessage(); gd.addDialogListener(this); checkboxes = gd.getCheckboxes(); previewing = true; gd.addHelp(IJ.URL+"/docs/menus/process.html#find-maxima"); gd.showDialog(); //input by the user (or macro) happens here if (gd.wasCanceled()) return DONE; previewing = false; if (!dialogItemChanged(gd, null)) //read parameters return DONE; IJ.register(this.getClass()); //protect static class variables (parameters) from garbage collection return flags; } // boolean showDialog
xInc = cal.pixelWidth; units = cal.getUnits(); yLabel = cal.getValueUnit(); ImageProcessor ip = imp.getProcessor();
xInc = cal.pixelWidth; units = cal.getUnits(); yLabel = cal.getValueUnit(); ImageProcessor ip = imp.getProcessor();
oldFunction = function; double[] p = cal.getCoefficients(); unit = cal.getValueUnit(); if (unit == Calibration.DEFAULT_VALUE_UNIT) unit = unitSaved;
oldFunction = function; double[] p = cal.getCoefficients(); unit = cal.getValueUnit(); if (unit == Calibration.DEFAULT_VALUE_UNIT) unit = unitSaved;
double ymax = a[1]; int fit = cal.getFunction(); String unit = cal.getValueUnit(); Plot plot = new Plot("Calibration Function","pixel value",unit,px,py); plot.setLimits(xmin,xmax,ymin,ymax);
double ymax = a[1]; int fit = cal.getFunction(); String unit = cal.getValueUnit(); Plot plot = new Plot("Calibration Function","pixel value",unit,px,py); plot.setLimits(xmin,xmax,ymin,ymax);
Calibration cal = imp.getCalibration(); if (cal.calibrated()) s += cal.getValueUnit(); else if (uncalibratedOD) s += "Uncalibrated OD";