(ImagePlus imp)
| 456 | } |
| 457 | |
| 458 | ImageStack getRGBStack(ImagePlus imp) { |
| 459 | ImageProcessor ip = imp.getProcessor(); |
| 460 | int w = ip.getWidth(); |
| 461 | int h = ip.getHeight(); |
| 462 | int size = w*h; |
| 463 | byte[] r = new byte[size]; |
| 464 | byte[] g = new byte[size]; |
| 465 | byte[] b = new byte[size]; |
| 466 | ((ColorProcessor)ip).getRGB(r, g, b); |
| 467 | ImageStack stack = new ImageStack(w, h); |
| 468 | stack.addSlice("Red", r); |
| 469 | stack.addSlice("Green", g); |
| 470 | stack.addSlice("Blue", b); |
| 471 | stack.setColorModel(ip.getDefaultColorModel()); |
| 472 | return stack; |
| 473 | } |
| 474 | |
| 475 | public LUT createLutFromColor(Color color) { |
| 476 | return LUT.createLutFromColor(color); |
no test coverage detected