/** * This method provides a lazy initialization of the image associated to the ROI. The method * uses the Double-checked locking in order to maintain thread-safety * * @return */ private PlanarImage getImage() { PlanarImage img = roiImage; if (img == null) { synchronized (this) { img = roiImage; if (img == null) { roiImage = img = roi.getAsImage(); } } } return img; }
pb.addSource(vectorReference.getAsImage()); pb.addSource(rasterROI.getAsImage());
Rectangle bounds = roiImage.getBounds(); if (!(bounds.isEmpty())) { PlanarImage image = roiImage.getAsImage(); if (image != null) {
final PlanarImage roiImage = roi.getAsImage(); final Rectangle roiBounds = roiImage.getBounds(); boolean added = false;
/** * This method provides a lazy initialization of the image associated to the ROI. * The method uses the Double-checked locking in order to maintain thread-safety * * @return */ private PlanarImage getImage() { PlanarImage img = roiImage; if (img == null) { synchronized (this) { img = roiImage; if (img == null) { roiImage = img = roi.getAsImage(); } } } return img; }
/** * This method provides a lazy initialization of the image associated to the ROI. The method uses the Double-checked locking in order to maintain * thread-safety * * @return */ private PlanarImage getImage() { PlanarImage img = roiImage; if (img == null) { synchronized (this) { img = roiImage; if (img == null) { roiImage = img = roi.getAsImage(); } } } return img; }
/** * This method provides a lazy initialization of the image associated to the ROI. The method uses the Double-checked locking in order to maintain * thread-safety * * @return */ private PlanarImage getROIImage() { PlanarImage img = sourceROIimg; if (img == null) { synchronized (this) { img = sourceROIimg; if (img == null) { sourceROIimg = img = sourceROI.getAsImage(); } } } return img; }
/** * This method provides a lazy initialization of the image associated to the ROI. The method uses the Double-checked locking in order to maintain * thread-safety * * @return */ private PlanarImage getImage() { PlanarImage img = roiImage; if (img == null) { synchronized (this) { img = roiImage; if (img == null) { roiImage = img = roi.getAsImage(); } } } return img; } }
/** * This method provides a lazy initialization of the image associated to the ROI. The method uses the Double-checked locking in order to maintain * thread-safety * * @return */ private PlanarImage getImage() { PlanarImage img = roiImage; if (img == null) { synchronized (this) { img = roiImage; if (img == null) { roiImage = img = roi.getAsImage(); } } } return img; }
/** * This method provides a lazy initialization of the image associated to the ROI. * * The method uses the Double-checked locking in order to maintain thread-safety * * @return */ protected PlanarImage getImage() { PlanarImage img = roiImage; if (img == null) { synchronized (this) { img = roiImage; if (img == null) { roiImage = img = roi.getAsImage(); } } } return img; }
/** * This method provides a lazy initialization of the image associated to the ROI. The method uses the Double-checked locking in order to maintain * thread-safety * * @return a PlanarImage representing ROI image */ private PlanarImage getImage() { PlanarImage img = roiImage; if (img == null) { synchronized (this) { img = roiImage; if (img == null) { roiImage = img = roi.getAsImage(); } } } return img; } }
/** * This method provides a lazy initialization of the image associated to the ROI. The method uses the Double-checked locking in order to maintain * thread-safety * * @return */ private PlanarImage getImage() { PlanarImage img = roiImage; if (img == null) { synchronized (this) { img = roiImage; if (img == null) { roiImage = img = roi.getAsImage(); } } } return img; } }
/** * This method provides a lazy initialization of the image associated to the ROI. The method uses the Double-checked locking in order to maintain * thread-safety * * @return */ private PlanarImage getImage() { PlanarImage img = roiImage; if (img == null) { synchronized (this) { img = roiImage; if (img == null) { roiImage = img = roi.getAsImage(); } } } return img; }
/** * This method provides a lazy initialization of the image associated to the ROI. The method uses the Double-checked locking in order to maintain * thread-safety * * @return */ protected PlanarImage getImage() { PlanarImage img = roiImage; if (img == null) { synchronized (this) { img = roiImage; if (img == null) { roiImage = img = roi.getAsImage(); } } } return img; } }
ImageWorker roi = new ImageWorker(rois[i].getAsImage()); roi.forceComponentColorModel(); ImageWorker alpha = new ImageWorker(alphas[i]);
/** * Checks two ROIs are equivalent * @param first * @param second * @param title * @throws IOException */ void assertROIEquivalent(ROI first, ROI second, String title) throws IOException { RenderedImage firstImage = first.getAsImage(); RenderedImage secondImage = second.getAsImage(); assertImagesEqual(firstImage, secondImage); }
final ImageWorker roiImageWorker = new ImageWorker(overallROI.getAsImage()); roiImageWorker.setRenderingHints(hints);
private boolean assertReportErrorImagesEqual(ROI first, ROI second) { RenderedImage image1 = first.getAsImage(); RenderedImage image2 = second.getAsImage(); boolean isOk = true; isOk &= (image1.getWidth() == image2.getWidth()); isOk &= (image1.getHeight() == image2.getHeight()); double[][] extrema = computeExtrema(image1, image2); for (int band = 0; band < extrema.length; band++) { isOk &= (Math.abs(0d - extrema[0][band]) < 1e-9); isOk &= (Math.abs(0d - extrema[1][band]) < 1e-9); } return isOk; }
private RoiAccessor buildRoiAccessor(ROI sourceROI) { if (sourceROI != null) { final PlanarImage roiImage = sourceROI.getAsImage(); final RandomIter roiIter = RandomIterFactory.create(roiImage, null); final int minRoiX = roiImage.getMinX(); final int minRoiY = roiImage.getMinY(); final int roiW = roiImage.getWidth(); final int roiH = roiImage.getHeight(); return new RoiAccessor(roiIter, sourceROI, roiImage, minRoiX, minRoiY, roiW, roiH); } return null; }
ImageWorker w = new ImageWorker(alphaArray[i]); ImageWorker w1 = new ImageWorker(rois[i].getAsImage()); ImageLayout layout = new ImageLayout(); layout.setMinX(alphaArray[i].getMinX());