/** * Returns an <code>PositiveFloat</code> object holding the value of * the specified string. * @param s The string to be parsed. * @return See above. */ public static PositiveFloat valueOf(String s) { return new PositiveFloat(Double.valueOf(s)); } }
/** * Transforms a Java type into the corresponding OMERO RType. * * @param value Java concrete type value. * @return RType or <code>null</code> if <code>value</code> is * <code>null</code>. */ public RDouble toRType(PositiveFloat value) { return value == null? null : rdouble(value.getValue()); }
/** * Creates a channel. * * @param index The index in the file. * @return See above. */ public Channel createChannel(int index) { Channel channel = new Channel(); channel.setID("Channel:"+index); channel.setAcquisitionMode(AcquisitionMode.FLUORESCENCELIFETIME); int argb = DEFAULT_COLOR.getRGB(); int rgba = (argb << 8) | (argb >>> (32-8)); channel.setColor(new ome.xml.model.primitives.Color(rgba)); channel.setName("Name"); channel.setIlluminationType(IlluminationType.OBLIQUE); channel.setPinholeSize(new Length(0.5, UNITS.MICROMETER)); channel.setContrastMethod(ContrastMethod.BRIGHTFIELD); PositiveFloat emWave = new PositiveFloat(300.3); channel.setEmissionWavelength(new Length(emWave.getValue(), UNITS.NANOMETER)); PositiveFloat exWave = new PositiveFloat(400.3); channel.setExcitationWavelength(new Length(exWave.getValue(), UNITS.NANOMETER)); channel.setFluor("Fluor"); channel.setNDFilter(1.0); channel.setPockelCellSetting(0); return channel; }
PositiveFloat baseValue = PositiveFloat.valueOf( element.getAttribute("Wavelength")); if (baseValue != null)
PositiveFloat baseValue = PositiveFloat.valueOf( element.getAttribute("Wavelength")); if (baseValue != null)
/** * Returns an <code>PositiveFloat</code> object holding the value of * the specified string. * @param s The string to be parsed. * @return See above. */ public static PositiveFloat valueOf(String s) { return new PositiveFloat(Double.valueOf(s)); } }
return new ome.units.quantity.Pressure(typedValue.getValue(), getBaseUnit(inModelUnit));
PositiveFloat baseValue = PositiveFloat.valueOf( element.getAttribute("Wavelength")); if (baseValue != null)
/** * Converts the given {@code double} to a {@link PositiveFloat}, or * {@code null} if incompatible. */ private PositiveFloat pf(final Double value, final String name) { if (value == null) return null; try { return new PositiveFloat(value); } catch (IllegalArgumentException e) { LOGGER.debug("Expected positive value for {}; got {}", name, value); } return null; }
return new ome.units.quantity.Length(typedValue.getValue(), getBaseUnit(inModelUnit));
/** * Converts the given {@code double} to a {@link PositiveFloat}, or * {@code null} if incompatible. */ private PositiveFloat pf(final Double value, final String name) { if (value == null) return null; try { return new PositiveFloat(value); } catch (IllegalArgumentException e) { LOGGER.debug("Expected positive value for {}; got {}", name, value); } return null; }
return new ome.units.quantity.Length(typedValue.getValue(), getBaseUnit(inModelUnit));
public static Length getExcitationWavelength(Double value) { if (value != null && value - Constants.EPSILON > 0 && value < Double.POSITIVE_INFINITY) { return createLength(new PositiveFloat(value), UNITS.NANOMETER); } LOGGER.debug("Expected positive value for ExcitationWavelength; got {}", value); return null; }
return new ome.units.quantity.Power(typedValue.getValue(), getBaseUnit(inModelUnit));
PositiveFloat baseValue = PositiveFloat.valueOf( element.getAttribute("Wavelength")); if (baseValue != null)
public static Length getExcitationWavelength(Double value) { if (value != null && value - Constants.EPSILON > 0 && value < Double.POSITIVE_INFINITY) { return createLength(new PositiveFloat(value), UNITS.NANOMETER); } LOGGER.debug("Expected positive value for ExcitationWavelength; got {}", value); return null; }
return new ome.units.quantity.Pressure(typedValue.getValue(), getBaseUnit(inModelUnit));