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

Method newImage

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

Source from the content-addressed store, hash-verified

3714 }
3715
3716 void newImage() {
3717 String title = getFirstString();
3718 String type = getNextString();
3719 int width = (int)getNextArg();
3720 int height = (int)getNextArg();
3721 int depth = (int)getNextArg();
3722 int c=-1, z=-1, t=-1;
3723 if (interp.nextToken()==')')
3724 interp.getRightParen();
3725 else {
3726 c = depth;
3727 z = (int)getNextArg();
3728 t = (int)getLastArg();
3729 }
3730 if (width<1 || height<1)
3731 interp.error("Width or height < 1");
3732 if (c<0)
3733 IJ.newImage(title, type, width, height, depth);
3734 else {
3735 ImagePlus imp = IJ.createImage(title, type, width, height, c, z, t);
3736 imp.show();
3737 }
3738 resetImage();
3739 }
3740
3741 void saveAs() {
3742 String format = getFirstString();

Callers 1

doFunctionMethod · 0.95

Calls 11

getFirstStringMethod · 0.95
getNextStringMethod · 0.95
getNextArgMethod · 0.95
getLastArgMethod · 0.95
newImageMethod · 0.95
createImageMethod · 0.95
showMethod · 0.95
resetImageMethod · 0.95
getRightParenMethod · 0.80
nextTokenMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected