(ImageStack stack, String[] strings)
| 24 | } |
| 25 | |
| 26 | private static ImageStack sortStack(ImageStack stack, String[] strings) { |
| 27 | ImageProcessor ip = stack.getProcessor(1); |
| 28 | ImageStack stack2 = new ImageStack(ip.getWidth(), ip.getHeight(), ip.getColorModel()); |
| 29 | for (int i=0; i<stack.size(); i++) { |
| 30 | int slice = (int)Tools.parseDouble(strings[i].substring(strings[i].length()-MAX_DIGITS), 0.0); |
| 31 | if (slice==0) return null; |
| 32 | stack2.addSlice(sliceLabels[slice-1], stack.getPixels(slice)); |
| 33 | } |
| 34 | stack2.update(stack.getProcessor(1)); |
| 35 | return stack2; |
| 36 | } |
| 37 | |
| 38 | private static String[] getSortStrings(ImageStack stack, String tag) { |
| 39 | double series = getSeriesNumber(getSliceLabel(stack,1)); |
no test coverage detected