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)
rasterStack to be saved to Tiff image slices
name of the image slices
directory, where the slices should be stored
numeric value that should represent NA values in the Tiff image, default is NaVal = 0
Saves the Tiff image files.
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())