Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve documentation of read.image #39

Open
lambdamoses opened this issue Mar 30, 2024 · 0 comments
Open

Improve documentation of read.image #39

lambdamoses opened this issue Mar 30, 2024 · 0 comments

Comments

@lambdamoses
Copy link

Specifically the documentation of the subset argument, which isn't very clear. I need to look into the source code to figure out what to put for subset when reading in only a subset of the image. Basically, according to the source code, subset should be a named list whose names are among "x", "y", "c", "z", and "t", corresponding to the dimensions of x, y, channel, z, and time. Each element of the list is integer indices of pixels to read in the dimension of interest just like when subsetting matrices, and if it's NULL then all in that dimension is read.

subset = sapply(names(xyczt), function(d) {
if ( is.null(subset[[d]]) )
seq_len(xyczt[d])
else {
sub = as.integer(subset[[d]])
sub[ sub >= 1L & sub <= xyczt[d] ]
}
}, simplify = FALSE)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants