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

Method dup

Astronomy_/src/main/java/util/Stack_Sorter.java:393–403  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

391 }
392
393 void dup() {
394 if (stack instanceof VirtualStack virtualStack) {
395 virtualStack.addSlice(virtualStack.getFileName(slice));
396 virtualStack.swapSlices(slice, virtualStack.getSize() - 1);
397 } else {
398 stack.addSlice(stack.getSliceLabel(slice), stack.getProcessor(slice).duplicate(), slice);
399 }
400 imp.setStack(null, stack);
401 imp.setSlice(slice + 1);
402 imp.updateAndDraw();
403 }
404
405 void dupN() {
406 int n = (int) IJ.getNumber("Number of times to duplicate the slice", 1);

Callers 2

actionPerformedMethod · 0.95
dupNMethod · 0.95

Calls 10

swapSlicesMethod · 0.80
setStackMethod · 0.80
getSizeMethod · 0.65
addSliceMethod · 0.45
getFileNameMethod · 0.45
getSliceLabelMethod · 0.45
duplicateMethod · 0.45
getProcessorMethod · 0.45
setSliceMethod · 0.45
updateAndDrawMethod · 0.45

Tested by

no test coverage detected