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

Method getPosition

ij/src/main/java/ij/macro/Functions.java:5770–5782  ·  view source on GitHub ↗
(ImagePlus imp)

Source from the content-addressed store, hash-verified

5768 }
5769
5770 void getPosition(ImagePlus imp) {
5771 Variable channel = getFirstVariable();
5772 Variable slice = getNextVariable();
5773 Variable frame = getLastVariable();
5774 int c = imp.getChannel();
5775 int z = imp.getSlice();
5776 int t = imp.getFrame();
5777 if (c*z*t>imp.getStackSize())
5778 {c=1; z=imp.getCurrentSlice(); t=1;}
5779 channel.setValue(c);
5780 slice.setValue(z);
5781 frame.setValue(t);
5782 }
5783
5784 void setPosition(ImagePlus img) {
5785 int channel = (int)getFirstArg();

Callers 1

doStackMethod · 0.95

Calls 9

getFirstVariableMethod · 0.95
getNextVariableMethod · 0.95
getLastVariableMethod · 0.95
setValueMethod · 0.95
getCurrentSliceMethod · 0.80
getChannelMethod · 0.65
getFrameMethod · 0.65
getSliceMethod · 0.45
getStackSizeMethod · 0.45

Tested by

no test coverage detected