public static Frequency createFrequency(Double value, Unit<Frequency> valueUnit) { if (value == null) { return null; } return new Frequency(value, valueUnit); }
public static Frequency createFrequency(Integer value, Unit<Frequency> valueUnit) { if (value == null) { return null; } return new Frequency(value, valueUnit); }
public static Frequency createFrequency(Integer value, Unit<Frequency> valueUnit) { if (value == null) { return null; } return new Frequency(value, valueUnit); }
public static Frequency createFrequency(Double value, Unit<Frequency> valueUnit) { if (value == null) { return null; } return new Frequency(value, valueUnit); }
public static <T extends PrimitiveNumber> Frequency createFrequency(T value, Unit<Frequency> valueUnit) { if (value == null) { return null; } return new Frequency(value.getNumberValue(), valueUnit); }
public static <T extends PrimitiveNumber> Frequency createFrequency(T value, Unit<Frequency> valueUnit) { if (value == null) { return null; } return new Frequency(value.getNumberValue(), valueUnit); }
public static <T extends Number> Frequency getQuantity(T inValue, UnitsFrequency inModelUnit) throws EnumerationException { if (inValue instanceof Double) { Double doubleValue = (Double) inValue; return new ome.units.quantity.Frequency(doubleValue, getBaseUnit(inModelUnit)); } if (inValue instanceof Integer) { Integer intValue = (Integer) inValue; return new ome.units.quantity.Frequency(intValue, getBaseUnit(inModelUnit)); } LOGGER.warn("Unknown type '{}' cannot be used to create a 'Frequency' quantity", inValue.getClass().getName()); throw new EnumerationException("UnitsFrequencyEnumHandler: type '" + inValue.getClass().getName() + "' cannot be used to create a quantity"); }
public static <T extends Number> Frequency getQuantity(T inValue, UnitsFrequency inModelUnit) throws EnumerationException { if (inValue instanceof Double) { Double doubleValue = (Double) inValue; return new ome.units.quantity.Frequency(doubleValue, getBaseUnit(inModelUnit)); } if (inValue instanceof Integer) { Integer intValue = (Integer) inValue; return new ome.units.quantity.Frequency(intValue, getBaseUnit(inModelUnit)); } LOGGER.warn("Unknown type '{}' cannot be used to create a 'Frequency' quantity", inValue.getClass().getName()); throw new EnumerationException("UnitsFrequencyEnumHandler: type '" + inValue.getClass().getName() + "' cannot be used to create a quantity"); }
public static ome.units.quantity.Frequency makeXMLQuantity(double d, String unit) { ome.units.unit.Unit<ome.units.quantity.Frequency> units = ome.xml.model.enums.handlers.UnitsFrequencyEnumHandler .getBaseUnit(makeXMLUnit(unit)); return new ome.units.quantity.Frequency(d, units); }
public static ome.units.quantity.Frequency makeFrequencyXML(double d, String unit) { ome.units.unit.Unit<ome.units.quantity.Frequency> units = ome.xml.model.enums.handlers.UnitsFrequencyEnumHandler .getBaseUnit(makeFrequencyUnitXML(unit)); return new ome.units.quantity.Frequency(d, units); }
return new ome.units.quantity.Frequency(typedValue.getValue(), getBaseUnit(inModelUnit)); return new ome.units.quantity.Frequency(typedValue.getValue(), getBaseUnit(inModelUnit)); return new ome.units.quantity.Frequency(typedValue.getValue(), getBaseUnit(inModelUnit)); return new ome.units.quantity.Frequency(typedValue.getValue(), getBaseUnit(inModelUnit)); return new ome.units.quantity.Frequency(typedValue.getValue(), getBaseUnit(inModelUnit)); return new ome.units.quantity.Frequency(typedValue.getValue(), getBaseUnit(inModelUnit)); return new ome.units.quantity.Frequency(typedValue.getValue(), getBaseUnit(inModelUnit));
return new ome.units.quantity.Frequency(typedValue.getValue(), getBaseUnit(inModelUnit)); return new ome.units.quantity.Frequency(typedValue.getValue(), getBaseUnit(inModelUnit)); return new ome.units.quantity.Frequency(typedValue.getValue(), getBaseUnit(inModelUnit)); return new ome.units.quantity.Frequency(typedValue.getValue(), getBaseUnit(inModelUnit)); return new ome.units.quantity.Frequency(typedValue.getValue(), getBaseUnit(inModelUnit)); return new ome.units.quantity.Frequency(typedValue.getValue(), getBaseUnit(inModelUnit)); return new ome.units.quantity.Frequency(typedValue.getValue(), getBaseUnit(inModelUnit));
private void initAlternateMetadataStore() throws FormatException { MetadataStore store = makeFilterMetadata(); store.setImagingEnvironmentTemperature( new Temperature(new Double(temperature.floatValue()), UNITS.CELSIUS), 0); String instrumentID = MetadataTools.createLSID("Instrument", 0); String detectorID = MetadataTools.createLSID("Detector", 0, 0); store.setInstrumentID(instrumentID, 0); store.setDetectorID(detectorID, 0, 0); store.setDetectorModel(model, 0, 0); store.setImageInstrumentRef(instrumentID, 0); if (exposureTime != null) { for (int i=0; i<getImageCount(); i++) { store.setPlaneExposureTime(new Time(new Double(exposureTime.floatValue()), UNITS.SECOND), 0, i); } } for (int i=0; i<getEffectiveSizeC(); i++) { store.setDetectorSettingsID(detectorID, 0, i); store.setDetectorSettingsReadOutRate( new Frequency(new Double(readoutTime.floatValue()), UNITS.HERTZ), 0, i); } }
private void initAlternateMetadataStore() throws FormatException { MetadataStore store = makeFilterMetadata(); store.setImagingEnvironmentTemperature( new Temperature(new Double(temperature.floatValue()), UNITS.CELSIUS), 0); String instrumentID = MetadataTools.createLSID("Instrument", 0); String detectorID = MetadataTools.createLSID("Detector", 0, 0); store.setInstrumentID(instrumentID, 0); store.setDetectorID(detectorID, 0, 0); store.setDetectorModel(model, 0, 0); store.setImageInstrumentRef(instrumentID, 0); if (exposureTime != null) { for (int i=0; i<getImageCount(); i++) { store.setPlaneExposureTime(new Time(new Double(exposureTime.floatValue()), UNITS.SECOND), 0, i); } } for (int i=0; i<getEffectiveSizeC(); i++) { store.setDetectorSettingsID(detectorID, 0, i); store.setDetectorSettingsReadOutRate( new Frequency(new Double(readoutTime.floatValue()), UNITS.HERTZ), 0, i); } }
/** * FIXME: this should likely take a default so that locations which don't * want an exception can have * * log.warn("Using new PositiveFloat(1.0)!", e); return new * PositiveFloat(1.0); * * or similar. */ public static ome.units.quantity.Frequency convertFrequency(Frequency t) { if (t == null) { return null; } Double v = t.getValue(); String u = t.getUnit().getSymbol(); ome.xml.model.enums.UnitsFrequency units = makeFrequencyUnitXML(u); ome.units.unit.Unit<ome.units.quantity.Frequency> units2 = ome.xml.model.enums.handlers.UnitsFrequencyEnumHandler .getBaseUnit(units); return new ome.units.quantity.Frequency(v, units2); }
/** * FIXME: this should likely take a default so that locations which don't * want an exception can have * * log.warn("Using new PositiveFloat(1.0)!", e); return new * PositiveFloat(1.0); * * or similar. */ public static ome.units.quantity.Frequency convert(Frequency t) { if (t == null) { return null; } Double v = t.getValue(); // Use the code/symbol-mapping in the ome.model.enums files // to convert to the specification value. String u = ome.model.enums.UnitsFrequency.valueOf( t.getUnit().toString()).getSymbol(); ome.xml.model.enums.UnitsFrequency units = makeXMLUnit(u); ome.units.unit.Unit<ome.units.quantity.Frequency> units2 = ome.xml.model.enums.handlers.UnitsFrequencyEnumHandler .getBaseUnit(units); return new ome.units.quantity.Frequency(v, units2); }
/** * Creates a detector settings. * * @param ref Reference to the detector. * @return See above. */ public DetectorSettings createDetectorSettings(int ref) { DetectorSettings settings = new DetectorSettings(); settings.setID("Detector:"+ref); settings.setBinning(BINNING); settings.setGain(1.0); settings.setOffset(1.0); settings.setReadOutRate(new Frequency(1.0, UNITS.HERTZ)); settings.setVoltage(new ElectricPotential(1.0, UNITS.VOLT)); settings.setIntegration(new PositiveInteger(20)); settings.setZoom(3.0); return settings; }
new Frequency(speed.get(c), UNITS.HERTZ), 0, c);
new Frequency(speed.get(c), UNITS.HERTZ), 0, c);
laser.setLaserMedium(LASER_MEDIUM); laser.setPockelCell(false); laser.setRepetitionRate(new Frequency(30.0, UNITS.ATTOHERTZ)); laser.setTuneable(false); laser.setWavelength(new Length(200.0, UNITS.NANOMETER));