threeDto4D: threeDto4D

Description Usage Arguments Value See Also Examples

View source: R/niftiFMRI.R

Description

To read tm functionnal images files in ANALYZE or NIFTI format, and concatenate them to obtain one 4D image file in Analyze (hdr/img pair) or Nifti format (hdr/img pair or single nii) which is written on disk. Note that this function outputs the files in the format sent in. If desired, one can use the function analyze2nifti to create NIFTI files from ANALYZE files.

Usage

1
2
threeDto4D(outputfile,path.in=NULL,prefix=NULL,regexp=NULL,times=NULL,
       list.of.in.files=NULL,path.out=NULL,is.nii.pair=FALSE,hdr.number=1)

Arguments

outputfile

character. Name of the outputfile without extension

path.in

character with the path to the directory containing the image files

prefix

character. common prefix to each file

regexp

character. Regular expression to get all the files

times

vector. numbers of the image files to retrieve

list.of.in.files

names of img files to concatenate (with full path)

path.out

where to write the output hdr/img pair files. Will be taken as path.in if not provided.

is.nii.pair

logical. Should we write a signle nii NIFTI file or a hdr/img NIFTI pair file

hdr.number

Number of the original 3D Analyze or NIFTI image file from which to take the header that should serve as the final header of the newly 4D created image file

Value

None.

See Also

twoDto4D fourDto2D

Examples

1
2
3
# path.fonc <- "/network/home/lafayep/Stage/Data/map284/functional/
# MondrianApril2007/preprocessing/1801/smoothed/"
# threeDto4D("essai",path.in=path.fonc,prefix="su1801_",regexp="????.img",times=1:120)

AnalyzeFMRI documentation built on Oct. 5, 2021, 5:06 p.m.