makeCube | R Documentation |
Generates a Cubic volume of user's specified size.
makeCube(nvoxel, offset = 2)
nvoxel |
number of voxels along the side of the cube. |
offset |
number of voxels of the border around the cubic volume |
makeCube
is used by the function makeVOI
to extract VOIs from a 3D volume.
coords |
a matrix of voxel coordinates of the cube. |
volume |
a binarised 3D array of the volume of the cube. |
Alessio Veneziano
#Create a volume of a 21x21x21 cube with 2 voxels of offset cube<-makeCube(21,2) #Plot the 3D coords of the cube require(rgl) points3d(cube$coords,col="grey",size=2) #Plot a slice of the volume (the cube is in white pixels) image(cube$volume[,,10],col=grey(0:32/32))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.