Controls which channels in a composite color image are displayed, where 'channels' is a list of ones and zeros that specify the channels to display. For example, "101" causes channels 1 and 3 to be displayed.
(String channels)
| 440 | where 'channels' is a list of ones and zeros that specify the channels to |
| 441 | display. For example, "101" causes channels 1 and 3 to be displayed. */ |
| 442 | public void setActiveChannels(String channels) { |
| 443 | if (!(this instanceof CompositeImage)) |
| 444 | return; |
| 445 | boolean[] active = ((CompositeImage)this).getActiveChannels(); |
| 446 | for (int i=0; i<active.length; i++) { |
| 447 | boolean b = false; |
| 448 | if (channels.length()>i && channels.charAt(i)=='1') |
| 449 | b = true; |
| 450 | active[i] = b; |
| 451 | } |
| 452 | updateAndDraw(); |
| 453 | Channels.updateChannels(); |
| 454 | } |
| 455 | |
| 456 | /** Updates this image from the pixel data in its |
| 457 | associated ImageProcessor, then displays it. |
no test coverage detected