Skip to content

Commit 9cc57c5

Browse files
Expose channel names from ChannelAxis (#26)
* Copy list * Update ChannelAxis.java
1 parent 81a9b5b commit 9cc57c5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/java/qupath/bioimageio/spec/tensor/axes/ChannelAxis.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package qupath.bioimageio.spec.tensor.axes;
1818

19+
import java.util.ArrayList;
1920
import qupath.bioimageio.spec.tensor.sizes.FixedSize;
2021
import qupath.bioimageio.spec.tensor.sizes.Size;
2122
import qupath.bioimageio.spec.tensor.BaseTensor;
@@ -43,6 +44,14 @@ public void validate(List<? extends BaseTensor> tensors) {
4344
// fixed size based on list of channels
4445
}
4546

47+
/**
48+
* Get the list of channel names
49+
* @return a copy of the underlying list of channel names
50+
*/
51+
public List<String> getChannelNames() {
52+
return new ArrayList<>(channel_names);
53+
}
54+
4655
@Override
4756
public AxisType getType() {
4857
return AxisType.C;

0 commit comments

Comments
 (0)