Skip to content

Commit e468462

Browse files
committed
+channelNames(),ImageArray
1 parent 7863e19 commit e468462

File tree

4 files changed

+16
-0
lines changed

4 files changed

+16
-0
lines changed

NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ exportMethods(CTtype)
5656
exportMethods(addCT)
5757
exportMethods(as.data.frame)
5858
exportMethods(axes)
59+
exportMethods(channelNames)
5960
exportMethods(colnames)
6061
exportMethods(data)
6162
exportMethods(dim)

R/AllGenerics.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ setGeneric("meta", \(x, ...) standardGeneric("meta"))
7979
setGeneric("query", \(x, ...) standardGeneric("query"))
8080
setGeneric("mask", \(x, i, j, ...) standardGeneric("mask"))
8181

82+
setGeneric("channelNames", \(x, ...) standardGeneric("channelNames"))
8283
setGeneric("filterElements", \(x, y, ...) standardGeneric("filterElements"))
8384

8485
# tbl ----

R/ImageArray.R

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ ImageArray <- function(data=list(), meta=Zattrs(), metadata=list(), ...) {
2828
return(x)
2929
}
3030

31+
#' @rdname ImageArray
32+
#' @export
33+
setMethod("channelNames", "ImageArray", \(x, ...) meta(x)$omero$channels$label)
34+
35+
#' @rdname ImageArray
36+
#' @export
37+
setMethod("channelNames", "ANY", \(x, ...) stop("only 'images' have channels"))
38+
3139
#' @importFrom S4Vectors isSequence
3240
.get_multiscales_dataset_paths <- function(md) {
3341

man/ImageArray.Rd

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)