Retrieves color associated to a given roi group.
(int group)
| 1930 | |
| 1931 | /** Retrieves color associated to a given roi group. */ |
| 1932 | private static Color getGroupColor(int group) { |
| 1933 | Color color = ROIColor; // default ROI color |
| 1934 | if (group>0) { // read Glasbey Lut |
| 1935 | if (glasbeyLut==null) { |
| 1936 | String path = IJ.getDir("luts")+"Glasbey.lut"; |
| 1937 | glasbeyLut = LutLoader.openLut("noerror:"+path); |
| 1938 | if (glasbeyLut==null) { |
| 1939 | path = IJ.getDir("luts")+"glasbey.lut"; |
| 1940 | glasbeyLut = LutLoader.openLut("noerror:"+path); |
| 1941 | } |
| 1942 | if (glasbeyLut==null) |
| 1943 | IJ.log("LUT not found: "+path); |
| 1944 | } |
| 1945 | if (glasbeyLut!=null) |
| 1946 | color = new Color(glasbeyLut.getRGB(group)); |
| 1947 | } |
| 1948 | return color; |
| 1949 | } |
| 1950 | |
| 1951 | /** Returns the angle in degrees between the specified line and a horizontal line. */ |
| 1952 | public double getAngle(int x1, int y1, int x2, int y2) { |