if (FALSE) {
z <- zenith_image(1000, lens())
m <- !is.na(z)
my_file <- file.path(tempdir(), "mask")
write_bin(m, my_file)
my_file <- as.filename(my_file) %>%
insert(., ext = "tif", replace = TRUE) %>%
as.character()
m_from_disk <- read_bin(my_file)
plot(m - m_from_disk)
}
Run the code above in your browser using DataLab