Compute a common mask between two spaces
Usage
common_mask(g1, g2, rule = c("intersection", "union"))Examples
m1 <- array(c(TRUE, FALSE, TRUE, TRUE), c(2, 2, 1))
m2 <- array(c(TRUE, TRUE, FALSE, TRUE), c(2, 2, 1))
sp1 <- space_voxel(c(2,2,1), diag(4), mask_bitmap = m1,
storage = "packed")
sp2 <- space_voxel(c(2,2,1), diag(4), mask_bitmap = m2,
storage = "packed")
common_mask(sp1, sp2, rule = "intersection")
#> $idx1
#> [1] 1 3
#>
#> $idx2
#> [1] 1 3
#>