We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d4b37ca + 7ef5437 commit 03e2061Copy full SHA for 03e2061
src/main/java/org/micromanager/lightsheetmanager/api/internal/DefaultChannelSettings.java
@@ -66,14 +66,16 @@ public Builder copyBuilder() {
66
}
67
68
/**
69
- * Returns the number of channels for the selected channel group,
+ * Returns the number of used channels for the selected channel group,
70
* and returns 0 if the channel group does not exist.
71
*
72
* @return the number of channels in the channel group
73
*/
74
@Override
75
public int numChannels() {
76
- return groups_.getOrDefault(channelGroup_, EMPTY_CHANNELS).length;
+ return Arrays.stream(groups_.getOrDefault(channelGroup_, EMPTY_CHANNELS))
77
+ .filter(ChannelSpec::useChannel)
78
+ .toArray(ChannelSpec[]::new).length;
79
80
81
0 commit comments