makeSphere | R Documentation |
Generates a Spheric volume of user's specified size.
makeSphere(nvoxel, offset = 2)
nvoxel |
number of voxels along the diameter of the sphere. |
offset |
number of voxels of the border around the cubic volume |
makeSphere
is used by the function makeVOI
to extract VOIs from a 3D volume.
coords |
a matrix of voxel coordinates of the sphere. |
volume |
a binarised 3D array of the volume of sphere. |
Alessio Veneziano
#Create a volume of a 21 voxels diameter sphere with 2 voxels of offset sph<-makeSphere(21,2) #Plot the 3D coords of the sphere require(rgl) points3d(sph$coords,col="grey",size=2) #Plot a slice of the volume (the sphere is in white pixels) image(sph$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.