()
| 4869 | } |
| 4870 | |
| 4871 | void setOption() { |
| 4872 | String arg1 = getFirstString(); |
| 4873 | boolean state = true; |
| 4874 | if (interp.nextToken()==',') { |
| 4875 | interp.getComma(); |
| 4876 | double arg2 = interp.getBooleanExpression(); |
| 4877 | interp.checkBoolean(arg2); |
| 4878 | state = arg2==0?false:true; |
| 4879 | } |
| 4880 | interp.getRightParen(); |
| 4881 | arg1 = arg1.toLowerCase(Locale.US); |
| 4882 | if (arg1.equals("disablepopupmenu")) { |
| 4883 | ImageCanvas ic = getImage().getCanvas(); |
| 4884 | if (ic!=null) ic.disablePopupMenu(state); |
| 4885 | } else if (arg1.startsWith("show all")) { |
| 4886 | RoiManager rm = roiManager!=null?roiManager:RoiManager.getInstance(); |
| 4887 | if (rm!=null) |
| 4888 | rm.runCommand(state?"show all":"show none"); |
| 4889 | } else if (arg1.equals("changes")) |
| 4890 | getImage().changes = state; |
| 4891 | else if (arg1.equals("debugmode")) |
| 4892 | IJ.setDebugMode(state); |
| 4893 | else if (arg1.equals("openusingplugins")) |
| 4894 | Opener.setOpenUsingPlugins(state); |
| 4895 | else if (arg1.equals("queuemacros")) |
| 4896 | pgm.queueCommands = state; |
| 4897 | else if (arg1.equals("disableundo")) |
| 4898 | Prefs.disableUndo = state; |
| 4899 | else if (arg1.startsWith("openashyper")) |
| 4900 | getImage().setOpenAsHyperStack(true); |
| 4901 | else if (arg1.startsWith("black")) |
| 4902 | Prefs.blackBackground = state; |
| 4903 | else if (arg1.startsWith("display lab")) |
| 4904 | Analyzer.setMeasurement(LABELS, state); |
| 4905 | else if (arg1.startsWith("limit to")) |
| 4906 | Analyzer.setMeasurement(LIMIT, state); |
| 4907 | else if (arg1.startsWith("add to")) |
| 4908 | Analyzer.setMeasurement(ADD_TO_OVERLAY, state); |
| 4909 | else if (arg1.equals("area")) |
| 4910 | Analyzer.setMeasurement(AREA, state); |
| 4911 | else if (arg1.equals("mean")) |
| 4912 | Analyzer.setMeasurement(MEAN, state); |
| 4913 | else if (arg1.startsWith("perim")) |
| 4914 | Analyzer.setMeasurement(PERIMETER, state); |
| 4915 | else if (arg1.equals("stack position")) |
| 4916 | Analyzer.setMeasurement(STACK_POSITION, state); |
| 4917 | else if (arg1.startsWith("std")) |
| 4918 | Analyzer.setMeasurement(STD_DEV, state); |
| 4919 | else if (arg1.equals("showrowindexes")) |
| 4920 | ResultsTable.getResultsTable().showRowIndexes(state); |
| 4921 | else if (arg1.startsWith("show")) |
| 4922 | Analyzer.setOption(arg1, state); |
| 4923 | else if (arg1.startsWith("bicubic")) |
| 4924 | ImageProcessor.setUseBicubic(state); |
| 4925 | else if (arg1.startsWith("wand")||arg1.indexOf("points")!=-1) |
| 4926 | Wand.setAllPoints(state); |
| 4927 | else if (arg1.startsWith("expandablearrays")) |
| 4928 | expandableArrays = state; |
no test coverage detected