Exports a dataCube of type rasterStack as Tiff image sequence. Image sequences are a common structure to represent voxel data and most of the specific software to visualize voxel data is able to read it (e.g. blender)

saveImageSlices(rStack, filename, dir, NaVal = 0)

Arguments

rStack

rasterStack to be saved to Tiff image slices

filename

name of the image slices

dir

directory, where the slices should be stored

NaVal

numeric value that should represent NA values in the Tiff image, default is NaVal = 0

Value

Saves the Tiff image files.

Examples

crws <- lapply(X = seq(1:100), FUN = function(X) {
  sim.crw.3d(nStep = 100, rTurn = 0.99, rLift = 0.99, meanStep = 0.1)
})
points <- do.call("rbind", crws)
extent <- raster::extent(c(-10, 10, -10, 10))
ud <- voxelCount(points, extent,
  xyRes = 5,
  zMin = -10, zMax = 10, standartize = TRUE
)
saveImageSlices(ud, filename = "saveImageSlices_test", dir = tempdir())