Skip to content
Snippets Groups Projects
Commit ee328229 authored by Jean-Karim Heriche's avatar Jean-Karim Heriche
Browse files

Fix bug in points2img() when only one channel is selected.

parent 68735efb
No related branches found
No related tags found
No related merge requests found
......@@ -324,7 +324,12 @@ points2img <- function(points, voxel.size, method, channels = NULL, ncpu = 1) {
I[,,,c] <- bins$table.freq
}
} else {
bins <- aws::binning(x = points[,c('x','y','z')], y = NULL, nbins = image.size)
if(length(channels == 1)) {
pts <- points[which(points$channel == channels), c('x','y','z')]
bins <- aws::binning(x = pts, y = NULL, nbins = image.size)
} else {
bins <- aws::binning(x = points[,c('x','y','z')], y = NULL, nbins = image.size)
}
I <- array(bins$table.freq, dim = dim(bins$table.freq))
}
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment