MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / setSliceLabel

Method setSliceLabel

ij/src/main/java/ij/VirtualStack.java:374–383  ·  view source on GitHub ↗

Sets the label of the specified slice, where {@literal 1<=n<=nSlices}.

(String label, int n)

Source from the content-addressed store, hash-verified

372
373 /** Sets the label of the specified slice, where {@literal 1<=n<=nSlices}. */
374 public void setSliceLabel(String label, int n) {
375 if (n <= 0 || n > getSize())
376 throw new IllegalArgumentException(outOfRange+n);
377 if (isTranslatingIndices())
378 n = translate(n);
379 if (labels == null)
380 labels = new String[getSize()];
381 expandArrays(getSize());
382 labels[n-1] = label;
383 }
384
385 /** Sets the array of slice labels. The array size must be the stack size or larger */
386 protected void setSliceLabels(String[] labels) {

Callers 1

getProcessorMethod · 0.95

Calls 4

getSizeMethod · 0.95
isTranslatingIndicesMethod · 0.95
translateMethod · 0.95
expandArraysMethod · 0.95

Tested by

no test coverage detected