newMriImageFromFile(fileName, fileType = NULL)
newMriImageMetadataFromFile(fileName, fileType = NULL)
writeMriImageToFile(image, fileName = NULL, fileType = NA, datatype = NULL, overwrite = TRUE)identifyImageFileNames(fileName, fileType = NULL, errorIfMissing = TRUE)
imageFileExists(fileName, fileType = NULL)
removeImageFilesWithName(fileName)
tractorFileType
option. See Details.getDataTypeByNiftiCode
.newMriImageFromFile
and newMriImageMetadataFromFile
return the appropriate image or metadata object. imageFileExists
returns TRUE if an existing file with the specified name exists (all file extensions are checked), and FALSE otherwise. removeImageFilesWithName
returns the result of unlink
() applied to all relevant files. writeMriImageToFile
and identifyImageFileNames
return a list with the following elements, describing the identified or written files:writeMriImageToFile
. Suitable values for fileType
(and the tractorFileType
option, which is used as a default) are ANALYZE
, NIFTI
, NIFTI_PAIR
(the two-file NIfTI format), ANALYZE_GZ
, NIFTI_GZ
and NIFTI_PAIR_GZ
. The latter three are gzipped versions of the former three. NIFTI_GZ
is recommended unless there is a need for one of the others. This is the default value for the tractorFileType
option, but that can be changed using a call to options
, or by setting the TRACTOR_FILETYPE
environment variable before loading the tractor.base package.
MriImage
, MriImageMetadata
, getDataTypeByNiftiCode
and unlink
.