(boolean intValues)
| 2856 | } |
| 2857 | |
| 2858 | void getBounds(boolean intValues) { |
| 2859 | Variable x = getFirstVariable(); |
| 2860 | Variable y = getNextVariable(); |
| 2861 | Variable width = getNextVariable(); |
| 2862 | Variable height = getLastVariable(); |
| 2863 | ImagePlus imp = getImage(); |
| 2864 | Roi roi = imp.getRoi(); |
| 2865 | if (roi!=null) { |
| 2866 | if (intValues) { |
| 2867 | Rectangle r = roi.getBounds(); |
| 2868 | x.setValue(r.x); |
| 2869 | y.setValue(r.y); |
| 2870 | width.setValue(r.width); |
| 2871 | height.setValue(r.height); |
| 2872 | } else { |
| 2873 | Rectangle2D.Double r = roi.getFloatBounds(); |
| 2874 | x.setValue(r.x); |
| 2875 | y.setValue(r.y); |
| 2876 | width.setValue(r.width); |
| 2877 | height.setValue(r.height); |
| 2878 | } |
| 2879 | } else { |
| 2880 | x.setValue(0); |
| 2881 | y.setValue(0); |
| 2882 | width.setValue(imp.getWidth()); |
| 2883 | height.setValue(imp.getHeight()); |
| 2884 | } |
| 2885 | } |
| 2886 | |
| 2887 | String substring(String s) { |
| 2888 | s = getStringFunctionArg(s); |
no test coverage detected