/** * 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); }
/** * 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 RInt toRType(NonNegativeInteger value) { return value == null? null : rint(value.getValue()); }
TiffData_element.setAttribute("IFD", ifd.toString()); TiffData_element.setAttribute("PlaneCount", planeCount.toString()); TiffData_element.setAttribute("FirstZ", firstZ.toString()); TiffData_element.setAttribute("FirstC", firstC.toString()); TiffData_element.setAttribute("FirstT", firstT.toString());
int realCount = count == null ? 1 : count.getValue(); if (ifd == null && count == null) { realCount = ifdCount; p.ifd = q; if (ifd != null) { p.ifd += ifd.getValue(); int z = firstZ == null ? 0 : firstZ.getValue(); int c = firstC == null ? 0 : firstC.getValue(); int t = firstT == null ? 0 : firstT.getValue(); for (int p=0; p<planes.size(); p++) { Plane plane = planes.get(p); if (plane.getTheZ().getValue() >= core.get(i, 0).sizeZ || plane.getTheC().getValue() >= core.get(i, 0).sizeC || plane.getTheT().getValue() >= core.get(i, 0).sizeT) NonNegativeInteger firstT = meta.getTiffDataFirstT(i, td); NonNegativeInteger firstZ = meta.getTiffDataFirstZ(i, td); int c = firstC == null ? 0 : firstC.getValue(); int t = firstT == null ? 0 : firstT.getValue(); int z = firstZ == null ? 0 : firstZ.getValue(); int ifd = tdIFD == null ? 0 : tdIFD.getValue(); NonNegativeInteger numPlanes = meta.getTiffDataPlaneCount(i, td); NonNegativeInteger firstC = meta.getTiffDataFirstC(i, td); NonNegativeInteger firstT = meta.getTiffDataFirstT(i, td); NonNegativeInteger firstZ = meta.getTiffDataFirstZ(i, td);
store.setWellRow(new NonNegativeInteger(wellRowLetterIndex), 0, 0); store.setWellColumn(new NonNegativeInteger(wellColNumberIndex - 1), 0, 0); } else { store.setWellRow(new NonNegativeInteger(0), 0, 0); store.setWellColumn(new NonNegativeInteger(0), 0, 0); store.setWellSampleIndex(NonNegativeInteger.valueOf(seriesSite.get(s)), 0, 0, 0); store.setWellSampleImageRef(image_id, 0, 0, 0);
setIFD(NonNegativeInteger.valueOf( element.getAttribute("IFD"))); setPlaneCount(NonNegativeInteger.valueOf( element.getAttribute("PlaneCount"))); setFirstZ(NonNegativeInteger.valueOf( element.getAttribute("FirstZ"))); setFirstC(NonNegativeInteger.valueOf( element.getAttribute("FirstC"))); setFirstT(NonNegativeInteger.valueOf( element.getAttribute("FirstT")));
int realCount = count == null ? 1 : count.getValue(); if (ifd == null && count == null) { realCount = ifdCount; p.ifd = q; if (ifd != null) { p.ifd += ifd.getValue(); int z = firstZ == null ? 0 : firstZ.getValue(); int c = firstC == null ? 0 : firstC.getValue(); int t = firstT == null ? 0 : firstT.getValue(); for (int p=0; p<planes.size(); p++) { Plane plane = planes.get(p); if (plane.getTheZ().getValue() >= core.get(i, 0).sizeZ || plane.getTheC().getValue() >= core.get(i, 0).sizeC || plane.getTheT().getValue() >= core.get(i, 0).sizeT) NonNegativeInteger firstT = meta.getTiffDataFirstT(i, td); NonNegativeInteger firstZ = meta.getTiffDataFirstZ(i, td); int c = firstC == null ? 0 : firstC.getValue(); int t = firstT == null ? 0 : firstT.getValue(); int z = firstZ == null ? 0 : firstZ.getValue(); int ifd = tdIFD == null ? 0 : tdIFD.getValue(); NonNegativeInteger numPlanes = meta.getTiffDataPlaneCount(i, td); NonNegativeInteger firstC = meta.getTiffDataFirstC(i, td); NonNegativeInteger firstT = meta.getTiffDataFirstT(i, td); NonNegativeInteger firstZ = meta.getTiffDataFirstZ(i, td);
store.setWellRow(new NonNegativeInteger(wellRowLetterIndex), 0, 0); store.setWellColumn(new NonNegativeInteger(wellColNumberIndex - 1), 0, 0); } else { store.setWellRow(new NonNegativeInteger(0), 0, 0); store.setWellColumn(new NonNegativeInteger(0), 0, 0); store.setWellSampleIndex(NonNegativeInteger.valueOf(seriesSite.get(s)), 0, 0, 0); store.setWellSampleImageRef(image_id, 0, 0, 0);
setIFD(NonNegativeInteger.valueOf( element.getAttribute("IFD"))); setPlaneCount(NonNegativeInteger.valueOf( element.getAttribute("PlaneCount"))); setFirstZ(NonNegativeInteger.valueOf( element.getAttribute("FirstZ"))); setFirstC(NonNegativeInteger.valueOf( element.getAttribute("FirstC"))); setFirstT(NonNegativeInteger.valueOf( element.getAttribute("FirstT")));
/** * 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); }
/** Finds the Plane index corresponding to the given image plane number. */ private static int getPlaneIndex(IFormatReader r, int no) { MetadataRetrieve retrieve = (MetadataRetrieve) r.getMetadataStore(); int imageIndex = r.getSeries(); int planeCount = retrieve.getPlaneCount(imageIndex); int[] zct = r.getZCTCoords(no); for (int i=0; i<planeCount; i++) { Integer theC = retrieve.getPlaneTheC(imageIndex, i).getValue(); Integer theT = retrieve.getPlaneTheT(imageIndex, i).getValue(); Integer theZ = retrieve.getPlaneTheZ(imageIndex, i).getValue(); if (zct[0] == theZ.intValue() && zct[1] == theC.intValue() && zct[2] == theT.intValue()) { return i; } } return -1; }
TiffData_element.setAttribute("IFD", ifd.toString()); TiffData_element.setAttribute("PlaneCount", planeCount.toString()); TiffData_element.setAttribute("FirstZ", firstZ.toString()); TiffData_element.setAttribute("FirstC", firstC.toString()); TiffData_element.setAttribute("FirstT", firstT.toString());
/** * 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)); } }
/** Finds the Plane index corresponding to the given image plane number. */ private static int getPlaneIndex(IFormatReader r, int no) { MetadataRetrieve retrieve = (MetadataRetrieve) r.getMetadataStore(); int imageIndex = r.getSeries(); int planeCount = retrieve.getPlaneCount(imageIndex); int[] zct = r.getZCTCoords(no); for (int i=0; i<planeCount; i++) { Integer theC = retrieve.getPlaneTheC(imageIndex, i).getValue(); Integer theT = retrieve.getPlaneTheT(imageIndex, i).getValue(); Integer theZ = retrieve.getPlaneTheZ(imageIndex, i).getValue(); if (zct[0] == theZ.intValue() && zct[1] == theC.intValue() && zct[2] == theT.intValue()) { return i; } } return -1; }
setTheC(NonNegativeInteger.valueOf( element.getAttribute("TheC"))); NonNegativeInteger baseValue = NonNegativeInteger.valueOf( element.getAttribute("FontSize")); if (baseValue != null) setTheT(NonNegativeInteger.valueOf( element.getAttribute("TheT"))); setTheZ(NonNegativeInteger.valueOf( element.getAttribute("TheZ")));
/** * 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)); } }
@Override public void setPolygonTheZ(NonNegativeInteger theZ, int ROIIndex, int shapeIndex) { Polygon o = getPolygon(ROIIndex, shapeIndex); o.setTheZ(toRType(theZ.getValue())); }