Skip to content
Prev 311112 / 398506 Next

Question about contour3d and writeWebGL: rgl and misc3d package

That works!  Thanks for the help, but I can't seem to figure out why this
happens with even one contour in the example below:
Disclaimer: using MNI template from FSL (
http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Atlases).

Firefox still has array initialiser too large for this one contour, but
Safari and Chrome both will render it, but again it comes out half of a
brain and the vertices are connected across the brain and not a surface.

The code is the same as with the example from AnalyzeFMRI, but a different
dimension for the array and a different level (Also attached).

template <- f.read.nifti.volume("MNI152_T1_2mm_brain.nii")

template <- template[,,,1]


contour3d(template, x=1:dim(template)[1], y=1:dim(template)[2], z=1:dim(
template)[3], level = c(1000), alpha = c(0.2), color = c("white"))

browseURL(paste("file://", writeWebGL(dir=file.path(tempdir(), "webGL"),

          width=500), sep=""))
On Fri, Nov 16, 2012 at 8:37 PM, Duncan Murdoch <murdoch.duncan at gmail.com>wrote: