Expands the 'names' and 'labels' arrays if existing and smaller than minSize. This should be called each time the stack is enlarged
(int minSize)
| 103 | /** Expands the 'names' and 'labels' arrays if existing and smaller than minSize. |
| 104 | * This should be called each time the stack is enlarged */ |
| 105 | protected void expandArrays(int minSize) { |
| 106 | if (indexes != null && minSize < indexes.length) |
| 107 | minSize = indexes.length; //min size if slices were deleted previously |
| 108 | if (names != null && names.length < minSize) { |
| 109 | String[] tmp = new String[minSize*2]; |
| 110 | System.arraycopy(names, 0, tmp, 0, names.length); |
| 111 | names = tmp; |
| 112 | } |
| 113 | if (labels != null && labels.length < minSize) { |
| 114 | String[] tmp = new String[minSize*2]; |
| 115 | System.arraycopy(labels, 0, tmp, 0, labels.length); |
| 116 | labels = tmp; |
| 117 | } |
| 118 | } |
| 119 | |
| 120 | /** Does nothing. */ |
| 121 | public void addSlice(String sliceLabel, Object pixels) { |
no test coverage detected