public IntMatrix runTilesInParallel(int threadCount, Executor threadPool) throws Exception { super.executeInParallel(threadCount, threadPool); return this.result; } }
@Override protected final void runTile(int localRowIndex, int localColumnIndex) throws IOException, IllegalAccessException, InterruptedException { int localTileLeftX = localColumnIndex * getTileWidth(); int localTileTopY = localRowIndex * getTileHeight(); int localTileWidth = getTileWidth(); int localTileHeight = getTileHeight(); if (localTileLeftX + localTileWidth > getImageWidth()) { localTileWidth = getImageWidth() - localTileLeftX; } if (localTileTopY + localTileHeight > getImageHeight()) { localTileHeight = getImageHeight() - localTileTopY; } runTile(localTileLeftX, localTileTopY, localTileWidth, localTileHeight, localRowIndex, localColumnIndex); }
public final Path runTilesInParallel(int threadCount, Executor threadPool) throws Exception { super.executeInParallel(threadCount, threadPool); return this.temporaryFolder; }
public Int2ObjectMap<PixelStatistic> runTilesInParallel(int threadCount, Executor threadPool) throws Exception { super.executeInParallel(threadCount, threadPool); return this.statistics; } }
public ProductData runTilesInParallel(int threadCount, Executor threadPool) throws Exception { super.executeInParallel(threadCount, threadPool); return this.productData; } }
public Path runTilesInParallel(int threadCount, Executor threadPool) throws Exception { long startTime = System.currentTimeMillis(); if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, ""); // add an empty line logger.log(Level.FINE, "Start writing the product bands into local disk files: source product: '"+this.sourceProduct.getName()+"', image width: "+getImageWidth()+", image height: "+getImageHeight() + ", start time: " + new Date(startTime)); logger.log(Level.FINE, "Temporary folder path to store the binary files: '" + this.temporaryFolder.toFile().getAbsolutePath()+"'"); } boolean success = false; try { super.executeInParallel(threadCount, threadPool); success = true; } finally { if (!success) { // failed to copy the data and delete the folder FileUtils.deleteTree(this.temporaryFolder.toFile()); } } if (logger.isLoggable(Level.FINE)) { long finishTime = System.currentTimeMillis(); long totalSeconds = (finishTime - startTime) / 1000; logger.log(Level.FINE, ""); // add an empty line logger.log(Level.FINE, "Finish writing product bands into local disk files: source product: '"+this.sourceProduct.getName()+"', image width: "+getImageWidth()+", image height: "+getImageHeight()+", total seconds: "+totalSeconds+", finish time: "+new Date(finishTime)); } return this.temporaryFolder; } }