set.seed(10)
X <- rnorm(1000)
## Not run:
# writeMRI(array(X, c(10,10,10)), filename = "test", format = "nifti", verbose = TRUE)
# # range(array(X, c(10,10,10)) - readMRI("test", format = "nifti")[])
#
# writeMRI(array(X, c(10,10,10)), filename = "test", format = "analyze", verbose = TRUE)
# # range(array(X, c(10,10,10)) - readMRI("test", format = "analyze")[])
#
# writeMRI(array(X, c(10,10,10)) , filename = "test", format = "rawb.gz", verbose = TRUE,
# size = "NA_integer_")
# # range(array(X, c(10,10,10)) - readMRI("test",
# # format = "rawb.gz", size = "NA_integer_", dim = c(10,10,10)))
# ## End(Not run)
Run the code above in your browser using DataLab