(String[] strings, String[] info, int maxDigits)
| 419 | } |
| 420 | |
| 421 | public ImageStack sortDicom(String[] strings, String[] info, int maxDigits) { |
| 422 | int n = size(); |
| 423 | String[] names2 = new String[n]; |
| 424 | for (int i=0; i<n; i++) |
| 425 | names2[i] = names[i]; |
| 426 | for (int i=0; i<n; i++) { |
| 427 | int slice = (int)Tools.parseDouble(strings[i].substring(strings[i].length()-maxDigits), 0.0); |
| 428 | if (slice==0) return null; |
| 429 | names[i] = names2[slice-1]; |
| 430 | labels[i] = info[slice-1]; |
| 431 | } |
| 432 | return this; |
| 433 | } |
| 434 | |
| 435 | /** Returns the ImagePlus Properties assoctated with the current slice, or null. */ |
| 436 | public Properties getProperties() { |
no test coverage detected