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

Method setSlice

ij/src/main/java/ij/macro/Functions.java:3699–3714  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3697 }
3698
3699 void setSlice() {
3700 int n = (int)getArg();
3701 ImagePlus imp = getImage();
3702 int nSlices = imp.getStackSize();
3703 if (n==1 && nSlices==1)
3704 return;
3705 else if (n<1 || n>nSlices)
3706 interp.error("Argument must be >=1 and <="+nSlices);
3707 else {
3708 if (imp.isHyperStack())
3709 imp.setPosition(n);
3710 else
3711 imp.setSlice(n);
3712 }
3713 resetImage();
3714 }
3715
3716 void newImage() {
3717 String title = getFirstString();

Callers 2

doFunctionMethod · 0.95
activateSelectionMethod · 0.45

Calls 8

getArgMethod · 0.95
getImageMethod · 0.95
getStackSizeMethod · 0.95
isHyperStackMethod · 0.95
setPositionMethod · 0.95
setSliceMethod · 0.95
resetImageMethod · 0.95
errorMethod · 0.45

Tested by

no test coverage detected