powered by
Creates a .img and .hdr pair of files from a given array
f.write.analyze(mat,file,size,pixdim,vox.units,cal.units,originator)
An array
The name of the file to be written, without .img or .hdr suffix
Specify the format of the .img file. Either "float" (for 4 byte floats) or "int" (2 byte integers) or "char" (1 byte integers).
A vector of length 3 specifying the voxel dimensions in mm
String specifying the spatial units of measure for a voxel
String specifying the name of calibration unit
vector of length 5, only the three first values are used. Put the last two equal to zero
Nothing is returned
f.write.array.to.img.8bit, f.write.array.to.img.2bytes, f.write.array.to.img.float
f.write.array.to.img.8bit
f.write.array.to.img.2bytes
f.write.array.to.img.float
# NOT RUN { a<-array(rnorm(20*30*40*3),dim=c(20,30,40,3)) file<-"temp" f.write.analyze(a,file,size="float") f.analyze.file.summary("temp.img") # }
Run the code above in your browser using DataLab