analyze2nifti | R Documentation |
Create a NIFTI file from an Analyze file.
analyze2nifti(file.in,path.in=".",path.out=NULL,file.out=NULL,is.nii=TRUE,
qform.code=2,sform.code=2,data.type=rawToChar(raw(10)),db.name=rawToChar(raw(18)),
dim.info=rawToChar(raw(1)),dim=NULL,TR=0,slice.code=rawToChar(raw(1)),
xyzt.units=rawToChar(raw(1)),descrip=NULL,aux.file=rawToChar(raw(24)),
intent.name=rawToChar(raw(16)))
file.in |
character, filename of the Analyze file to be read |
path.in |
character, Directory path from where to take the .hdr,.img,.mat files |
path.out |
character, Directory path where to write the .hdr/.img or .nii file |
file.out |
character, filename of the NIFTI file to write (without
extension). If |
is.nii |
logical, if |
qform.code |
value in 0,...,4 |
sform.code |
value in 0,...,4 |
data.type |
char[10]. UNUSED in NIFTI-1 but could be filled with what you want |
db.name |
char[18]. UNUSED in NIFTI-1 but could be filled with what you want |
dim.info |
MRI slice ordering: This field encode which spatial
dimension (1= |
dim |
vector (of length 8) of image dimensions. |
TR |
Time Repetition to be stored in |
slice.code |
Slice timing order. If this is nonzero, AND if |
xyzt.units |
Units of |
descrip |
char[80]. This field may contain any text you like |
aux.file |
char[24]. This field is used to store an auxiliary filename. |
intent.name |
char[16]. name or meaning of data. If no data name is implied or needed, |
Nothing is returned. The NIFTI file is created in the specified path.out directory (default is current directory).
tmpdir <- tempdir()
analyze2nifti(path.in = system.file(package = "AnalyzeFMRI"),
path.out = tmpdir, file.in = "example",
file.out = "nifti-tmp", is.nii = TRUE)
unlink(tmpdir) # tidy up
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.