/** * Wraps the specified integer into a Non negative integer. * * @param r The value to wrap. * @return See above. */ private static NonNegativeInteger unwrap(int r) { return new NonNegativeInteger(r); }
/** * Wraps the specified integer into a Non negative integer. * * @param r The value to wrap. * @return See above. */ private static NonNegativeInteger unwrap(int r) { return new NonNegativeInteger(r); }
/** * Returns an <code>NonNegativeInteger</code> object holding the value of * the specified string. * @param s The string to be parsed. * @return See above. */ public static NonNegativeInteger valueOf(String s) { return new NonNegativeInteger(Integer.valueOf(s)); } }
/** * Returns an <code>NonNegativeInteger</code> object holding the value of * the specified string. * @param s The string to be parsed. * @return See above. */ public static NonNegativeInteger valueOf(String s) { return new NonNegativeInteger(Integer.valueOf(s)); } }
private static NonNegativeInteger toNonNegativeInteger(RInt v) { try { Integer asInt = fromRType(v); return asInt != null? new NonNegativeInteger(asInt) : null; } catch (IllegalArgumentException e) { log.warn("Using new NonNegativeInteger(0)!", e); return new NonNegativeInteger(0); } }
private void populateTiffData(OMEXMLMetadata omeMeta, int[] zct, int ifd, int series, int plane) { omeMeta.setTiffDataFirstZ(new NonNegativeInteger(zct[0]), series, plane); omeMeta.setTiffDataFirstC(new NonNegativeInteger(zct[1]), series, plane); omeMeta.setTiffDataFirstT(new NonNegativeInteger(zct[2]), series, plane); omeMeta.setTiffDataIFD(new NonNegativeInteger(ifd), series, plane); omeMeta.setTiffDataPlaneCount(new NonNegativeInteger(1), series, plane); }
private void populateTiffData(OMEXMLMetadata omeMeta, int[] zct, int ifd, int series, int plane) { omeMeta.setTiffDataFirstZ(new NonNegativeInteger(zct[0]), series, plane); omeMeta.setTiffDataFirstC(new NonNegativeInteger(zct[1]), series, plane); omeMeta.setTiffDataFirstT(new NonNegativeInteger(zct[2]), series, plane); omeMeta.setTiffDataIFD(new NonNegativeInteger(ifd), series, plane); omeMeta.setTiffDataPlaneCount(new NonNegativeInteger(1), series, plane); }
private static NonNegativeInteger unwrap(RInt r) { if (r == null) { return null; } return new NonNegativeInteger(r.getValue()); }
private void populateTiffData(final String dimensionOrder, final long[] zct, final int ifd, final int series, final int plane) { int zIndex = 0; int tIndex = 0; int cIndex = 0; // Determine zct positions int index = 0; for (final char c : dimensionOrder.toUpperCase().toCharArray()) { switch (c) { case 'Z': zIndex = index++; break; case 'C': cIndex = index++; break; case 'T': tIndex = index++; break; } } omeMeta.setTiffDataFirstZ(new NonNegativeInteger((int) zct[zIndex]), series, plane); omeMeta.setTiffDataFirstC(new NonNegativeInteger((int) zct[cIndex]), series, plane); omeMeta.setTiffDataFirstT(new NonNegativeInteger((int) zct[tIndex]), series, plane); omeMeta.setTiffDataIFD(new NonNegativeInteger(ifd), series, plane); omeMeta.setTiffDataPlaneCount(new NonNegativeInteger(1), series, plane); }
private void populateROI(List<String> columns, String[] data, int series, int roi, int time, int z, MetadataStore store) { String roiID = MetadataTools.createLSID("ROI", roi, 0); store.setROIID(roiID, roi); store.setImageROIRef(roiID, series, roi); store.setEllipseID(MetadataTools.createLSID("Shape", roi, 0), roi, 0); store.setEllipseTheT(new NonNegativeInteger(time), roi, 0); store.setEllipseTheZ(new NonNegativeInteger(z), roi, 0); store.setEllipseX(new Double(data[columns.indexOf("Col")]), roi, 0); store.setEllipseY(new Double(data[columns.indexOf("Row")]), roi, 0); store.setEllipseText(data[columns.indexOf("Label")], roi, 0); double diam = Double.parseDouble(data[columns.indexOf("Cell Diam.")]); double radius = diam / 2; store.setEllipseRadiusX(radius, roi, 0); store.setEllipseRadiusY(radius, roi, 0); // NB: other attributes are "Nucleus Area", "Cell Type", and // "Mean Nucleus Intens." }
private void populateROI(List<String> columns, String[] data, int series, int roi, int time, int z, MetadataStore store) { String roiID = MetadataTools.createLSID("ROI", roi, 0); store.setROIID(roiID, roi); store.setImageROIRef(roiID, series, roi); store.setEllipseID(MetadataTools.createLSID("Shape", roi, 0), roi, 0); store.setEllipseTheT(new NonNegativeInteger(time), roi, 0); store.setEllipseTheZ(new NonNegativeInteger(z), roi, 0); store.setEllipseX(new Double(data[columns.indexOf("Col")]), roi, 0); store.setEllipseY(new Double(data[columns.indexOf("Row")]), roi, 0); store.setEllipseText(data[columns.indexOf("Label")], roi, 0); double diam = Double.parseDouble(data[columns.indexOf("Cell Diam.")]); double radius = diam / 2; store.setEllipseRadiusX(radius, roi, 0); store.setEllipseRadiusY(radius, roi, 0); // NB: other attributes are "Nucleus Area", "Cell Type", and // "Mean Nucleus Intens." }
/** * Creates a plane information object. * * @param z The z-section. * @param c The channel. * @param t The time-point. * @return See above. */ public Plane createPlane(int z, int c, int t) { Plane plane = new Plane(); plane.setDeltaT(new Time(0.1, UNITS.SECOND)); plane.setExposureTime(new Time(10.0, UNITS.SECOND)); plane.setPositionX(new Length(1.0, UNITS.REFERENCEFRAME)); plane.setPositionY(new Length(1.0, UNITS.REFERENCEFRAME)); plane.setPositionZ(new Length(1.0, UNITS.REFERENCEFRAME)); plane.setTheZ(new NonNegativeInteger(z)); plane.setTheC(new NonNegativeInteger(c)); plane.setTheT(new NonNegativeInteger(z)); plane.setHashSHA1("1234567890ABCDEF1234567890ABCDEF12345678"); return plane; }
final long[] coords = FormatTools.rasterToPosition(// imageMeta.get(i).getAxesLengthsNonPlanar(), q); store.setPlaneTheZ(new NonNegativeInteger((int) coords[0]), i, q); store.setPlaneTheC(new NonNegativeInteger((int) coords[1]), i, q); store.setPlaneTheT(new NonNegativeInteger((int) coords[2]), i, q);
shape.setTheC(new NonNegativeInteger(c)); shape.setTheZ(new NonNegativeInteger(z)); shape.setTheT(new NonNegativeInteger(t)); shape.setTransform(createTransform()); shape.setFillColor(new ome.xml.model.primitives.Color(100));
omeMeta.setTiffDataPlaneCount(new NonNegativeInteger(0), series, 0); return;
omeMeta.setTiffDataPlaneCount(new NonNegativeInteger(0), series, 0); return;
omeMeta.setTiffDataPlaneCount(new NonNegativeInteger(0), imageIndex, 0); return;
private Plate makePlate() { Plate plate = new Plate(); plate.setName(PLATE_NAME); plate.setID(PLATE_ID); plate.setRows(WELL_ROWS); plate.setColumns(WELL_COLS); plate.setRowNamingConvention(WELL_ROW); plate.setColumnNamingConvention(WELL_COL); int wellSampleIndex = 0; for (int row=0; row<WELL_ROWS.getValue(); row++) { for (int col=0; col<WELL_COLS.getValue(); col++) { Well well = new Well(); well.setID(String.format("Well:%d_%d", row, col)); well.setRow(new NonNegativeInteger(row)); well.setColumn(new NonNegativeInteger(col)); WellSample sample = new WellSample(); sample.setID(String.format("WellSample:%d_%d", row, col)); sample.setIndex(new NonNegativeInteger(wellSampleIndex)); sample.linkImage(ome.getImage(wellSampleIndex)); well.addWellSample(sample); plate.addWell(well); wellSampleIndex++; } } return plate; }
store.setWellRow(new NonNegativeInteger(row), 0, wellCount); store.setWellColumn(new NonNegativeInteger(col), 0, wellCount); store.setWellSampleIndex(new NonNegativeInteger(wellSampleIndex), 0, wellCount, 0); store.setWellSampleImageRef(InOutCurrentTest.IMAGE_ID, 0, wellCount, 0);
Well well = new Well(); well.setID(String.format("Well:%d_%d", row, col)); well.setRow(new NonNegativeInteger(row)); well.setColumn(new NonNegativeInteger(col)); sample.setIndex(new NonNegativeInteger(wellSampleIndex)); sample.linkImage(ome.getImage(0)); well.addWellSample(sample);