Copies the LUTs and display mode of 'imp' to this image. Does nothing if 'imp' is not a CompositeImage or 'imp' and this image do not have the same number of channels.
(ImagePlus imp)
| 603 | nothing if 'imp' is not a CompositeImage or 'imp' and this |
| 604 | image do not have the same number of channels. */ |
| 605 | public synchronized void copyLuts(ImagePlus imp) { |
| 606 | int channels = getNChannels(); |
| 607 | if (!imp.isComposite() || imp.getNChannels()!=channels) |
| 608 | return; |
| 609 | CompositeImage ci = (CompositeImage)imp; |
| 610 | LUT[] luts = ci.getLuts(); |
| 611 | if (luts!=null && luts.length==channels) { |
| 612 | lut = luts; |
| 613 | cip = null; |
| 614 | } |
| 615 | int mode2 = ci.getMode(); |
| 616 | setMode(mode2); |
| 617 | if (mode2==COMPOSITE) { |
| 618 | boolean[] active2 = ci.getActiveChannels(); |
| 619 | for (int i=0; i<MAX_CHANNELS; i++) |
| 620 | active[i] = active2[i]; |
| 621 | } |
| 622 | if (ci.hasCustomLuts()) |
| 623 | customLuts = true; |
| 624 | } |
| 625 | |
| 626 | int getChannelIndex() { |
| 627 | int channels = getNChannels(); |
no test coverage detected