Returns the label of the Nth image.
(int n)
| 348 | |
| 349 | /** Returns the label of the Nth image. */ |
| 350 | public String getSliceLabel(int n) { |
| 351 | if (isTranslatingIndices()) |
| 352 | n = translate(n); |
| 353 | if (labels==null) |
| 354 | return null; |
| 355 | String label = (n<=labels.length) ? labels[n-1] : null; //subclass may have grown stack without adding labels |
| 356 | if (names == null) |
| 357 | return label; |
| 358 | if (label==null) |
| 359 | return names[n-1]; |
| 360 | else { |
| 361 | if (label.startsWith("Label: ")) // slice label |
| 362 | return label.substring(7,label.length()); |
| 363 | else |
| 364 | return names[n-1]+"\n"+label; |
| 365 | } |
| 366 | } |
| 367 | |
| 368 | /** Returns null. */ |
| 369 | public Object[] getImageArray() { |
no test coverage detected