@Override public void parse() { super.parse(); nSamples = radii.size(); stack = (imp.isComposite()) ? ChannelSplitter.getChannel(imp, channel) : imp.getStack(); vxW = cal.pixelWidth; vxH = cal.pixelHeight; vxD = cal.pixelDepth; // Split processing across the number of available CPUs final Thread[] threads = new Thread[nCPUs]; setThreadedCounter(0); for (int ithread = 0; ithread < threads.length; ithread++) { final int chunkSize = (nSamples + nCPUs - 1) / nCPUs; // divide by // threads // rounded // up. final int start = ithread * chunkSize; final int end = Math.min(start + chunkSize, nSamples); threads[ithread] = threadService.newThread(new ChunkParser(start, end)); } ThreadUtil.startAndJoin(threads); }
if (entireStack) { if (imp.isHyperStack()) { ImageStack stack = ChannelSplitter.getChannel(imp, imp.getChannel()); stats = new StackStatistics(new ImagePlus("", stack)); } else
if (entireStack) { if (imp.isHyperStack()) { ImageStack stack = ChannelSplitter.getChannel(imp, imp.getChannel()); stats = new StackStatistics(new ImagePlus("", stack)); } else