# NOT RUN {
# Example 1
p <- system.file('exdata', 'soybean.tif', package = 'hyperbrick')
im <- brick(p)
plotRGB(im)
sw <- slideWindows(im, n = c(8, 8))
lapply(sw, lines) -> null_obj
lines(sw[[1]], col = "white", lwd = 3)
lines(sw[[64]], col = "white", lwd = 3)
# Example 2
ext <- extent(c(30, 350, 150, 230))
lines(ext, col = "red", lwd = 3)
sw2 <- slideWindows(ext, n = c(18, 6))
lapply(sw2, lines, col = "red") -> null_obj
# }
Run the code above in your browser using DataLab