Skip to content

Commit f9036fd

Browse files
committed
better util name
1 parent 69aad45 commit f9036fd

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

R/centroids.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ setMethod("centroids", "SpatialDataLabel", \(x,
3636
as=c("data.frame", "matrix")) {
3737
y <- data(x)
3838
as <- match.arg(as)
39-
ax <- .get_space_ax(x)
39+
ax <- .get_xy_axes(x)
4040
# max-projection
4141
if (length(dim(y)) > 2)
4242
y <- apply(y, c(ax$y, ax$x), max)

R/crop.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ NULL
119119
n <- length(nms)
120120
ix <- n; iy <- n-1
121121
}
122-
ax <- .get_space_ax(x)
122+
ax <- .get_xy_axes(x)
123123
.adapt <- \(t, type) {
124124
if (is.null(t)) return(NULL)
125125
if (type %in% c("scale", "translation"))

R/sdArray.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ setMethod("channels", "SpatialDataElement", \(x, ...) stop("only 'images' have c
168168
.sub_sda <- \(x, yx, z=list()) {
169169
# yx: user-provided spatial slices (list of 2: y, x)
170170
# z: user-provided channel slices (list of 1)
171-
ax <- .get_space_ax(x)
171+
ax <- .get_xy_axes(x)
172172
ls <- seq_along(data(x, NULL))
173173
data(x) <- lapply(ls, \(l) {
174174
sf <- 2^(l-1) # scale factor for current level

R/trans.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ setMethod("rotate", "SpatialDataArray", \(x, t, k=1, ..., rev=FALSE) {
137137
if (rev) t <- if (f == "scale") 1/t else -t
138138

139139
# project to spatial (XY) dims
140-
ax <- .get_space_ax(x)
140+
ax <- .get_xy_axes(x)
141141
xy <- c(ax$x, ax$y)
142142
.t <- t[xy]
143143
.d <- d[xy]

R/utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
}
122122

123123
# internal helper to resolve spatial (XY) axis indices
124-
.get_space_ax <- \(x) {
124+
.get_xy_axes <- \(x) {
125125
nm <- axes(x, "name")
126126
ix <- match("x", nm)
127127
iy <- match("y", nm)

0 commit comments

Comments
 (0)