Skip to content

Commit

Permalink
handle filterBySegmentation in clio scenes
Browse files Browse the repository at this point in the history
* these must also be protected from unboxing
* Otherwise neuroglancer reports:
  Error parsing "filterBySegmentation" property: Expected array, received: "segments"
  • Loading branch information
jefferis committed Oct 31, 2021
1 parent fb50781 commit e51d48e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/urls.R
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ ngl_encode_url <- function(body, baseurl=NULL,
# wrapping length 1 segment vectors with I()
# avoids a formatting error where auto_unbox produces a json scalar
# when neuroglancer wants to see a json array
preserve_array <- function(x, fields=c("segments", "hiddenSegments")) {
preserve_array <- function(x, fields=c("segments", "hiddenSegments", "filterBySegmentation")) {
for(fn in fields) {
xs=x[[fn]]
if(length(xs)==1)
Expand Down

0 comments on commit e51d48e

Please sign in to comment.