Man pages for freesurferformats
Read and Write 'FreeSurfer' Neuroimaging File Formats

adjust.face.indices.toAdjust integer matrix to target min value.
analyze.dtype.infoCompute the R data type and the number of bytes per value for...
analyze.header.checkCheck whether an ANALYZE 7.5 header is suitable for writing.
analyzeheader.for.dataCreate ANALYZE 7.5 header suitable for given data.
analyzeheader.templateCreate a template ANALYZE 7.5 header. You will have to adapt...
analyze.header.to.vox2rasCompute a transformation matrix from the fields of an ANALYZE...
analyze.mat.sidecar.to.vox2rasCompute the voxel-to-RAS matrix from the MATLAB sidecar file...
analyze.pair.filesDetermine the header and data file of an ANALYZE 7.5 or NIFTI...
analyze.read.char.fieldRead a fixed length character field of an ANALYZE 7.5 header.
analyze.read.header.internalRead ANALYZE 7.5 header from file.
analyze.read.magicRead the 4 magic bytes of an ANALYZE 7.5 or NIFTI v1 header.
analyze.write.data.internalWrite the voxel data of an ANALYZE 7.5 image to a connection.
annot.max.region.idxGet max region index of an fs.annot instance.
annot.uniqueMake the region names and indices unique across hemispheres...
apply.affine.to.coordsApply an affine to a set of coordinates.
as.fs.tractsConvert a collection of tracts to an fs.tracts instance.
as.list.fs.tractsConvert an fs.tracts instance to a plain list of tracts.
assert.surfaceStop unless surf is an fs.surface
as.tsf.scalarsConvert scalar values for streamlines to a list of vectors.
atlas.from.lut.and.csvConstruct a brain atlas from a colortable (LUT) file and a...
axcodes2orntConvert axis codes to an orientation array.
build.mrtrix.headerBuild the text header of an MRtrix streamlines file.
build.mrtrix.header.stableDetermine the length of an MRtrix streamlines header.
bvsmpCreate new bvsmp instance encoding morph data for...
cdataCreate CDATA element string from string.
check_all_finiteCheck that a numeric vector or matrix contains only finite...
check_data_and_settings_consistencyWarn about common errors in combining data and datatype.
check.dtype.for.dataCheck whether the dtype is suitable for the data.
check_file_sizeCheck that a file is large enough to contain the expected...
cifti.annot.listAccept the input forms of a set of annotations.
cifti.annot.parcelsCollect the vertices of each region of an annotation.
cifti.array.with.new.first.dimCreate an array like the input, with a different first...
cifti.assign.rowsAssign rows of an array, reordered or repeated.
cifti.axes.to.mapsGroup axes into MatrixIndicesMap elements.
cifti.axis.brain.modelsCreate a CIFTI-2 axis for brain models.
cifti.axis.for.mapsBuild the axis for a set of maps.
cifti.axis.from.templateCreate a CIFTI-2 axis from a template file.
cifti.axis.labelsCreate a CIFTI-2 axis for label maps.
cifti.axis.named.mapsCreate a CIFTI-2 axis for named maps (internal helper).
cifti.axis.parcelsCreate a CIFTI-2 axis for parcels.
cifti.axis.parcels.from.annotCreate a CIFTI-2 parcels axis from brain surface annotations.
cifti.axis.scalarsCreate a CIFTI-2 axis for scalar or label maps.
cifti.axis.seriesCreate a CIFTI-2 axis for a series.
cifti.axis.sizeThe number of matrix entries an axis covers.
cifti.axis.surfacesCreate the Surface elements of an axis.
cifti.axis.surface.sizesGet the surface sizes of an axis as a named vector.
cifti.brain.model.surfaceCreate a CIFTI-2 brain model entry for a surface.
cifti.brain.model.volumeCreate a CIFTI-2 brain model entry for volume voxels.
cifti.brainordinate.dimGet the brainordinate dimension of a CIFTI-2 file.
cifti.brainordinate.dimsGet all matrix dimensions of a CIFTI-2 file that hold brain...
cifti.check.axesCheck a list of axes and name the dimensions.
cifti.check.data.for.axesCheck and prepare the data for a set of axes.
cifti.check.index.listCheck a vector of 0-based indices.
cifti.check.index.selectionCheck a matrix index selection.
cifti.check.label.tableCheck a label table for writing.
cifti.check.objectCheck that an object is an fs.cifti instance.
cifti.compute.index.rangesCompute the index ranges of brain model entries.
cifti.connectome.axesDetermine the two axes of a connectome file.
cifti.data.for.all.verticesAssemble the data values of all vertices for a file without a...
cifti.data.for.connectomeAccept the input forms of a CIFTI-2 connectome.
cifti.data.for.grayordinatesSelect the data values of the grayordinates of a file.
cifti.data.objectAccept the input forms of a CIFTI-2 data object.
cifti.data.per.structureGet the per-structure data of one structure.
cifti.data.structuresDetermine the structures of per-vertex data.
cifti.data.surface.sizeThe number of vertices of the surface of one structure.
cifti.dense.structure.matrixGet the dense data matrix of one structure for the...
cifti.dim.labelsGet axis labels for a matrix dimension of a CIFTI-2 file.
cifti.dim.to.frontMove one dimension of an array to the front.
CIFTI_EXTENSION_CODEThe NIFTI v2 extension code that holds the CIFTI-2 XML...
cifti.file.looks.like.cifti1Check whether a file looks like a CIFTI-1 file.
cifti.file.looks.like.cifti2Check whether a file is a CIFTI-2 file (internal helper).
cifti.file.type.for.axesGet the standard CIFTI-2 file type for a set of axes.
cifti.file.type.for.extensionThe CIFTI-2 file type a file name names.
cifti.file.typesThe standard CIFTI-2 file types.
cifti.grayordinatesGet the brainordinate table of a CIFTI-2 file.
cifti.grayordinates.for.axesBuild the brainordinate table of an axis.
cifti.grayordinates.for.modelExpand one brain model entry into a brainordinate table.
cifti.header.from.axesCreate the CIFTI-2 XML metadata for a set of axes.
cifti.header.ofAccept the input forms of a CIFTI-2 header.
cifti.index.typesThe CIFTI-2 index types (mapping types).
cifti.index.type.shortThe short name of a CIFTI-2 matrix index type.
cifti.is.connectome.axisCheck whether an axis describes a connectome dimension.
cifti.label.tableGet a label table from a CIFTI-2 label file.
cifti.label.table.for.writingConvert a label table to the format the writer expects.
cifti.map.for.dimGet the CIFTI indices map for a matrix dimension.
cifti.map.nameGet the name of one named map of a CIFTI-2 file.
cifti.map.type.descriptionDescribe a CIFTI-2 index type for humans.
cifti.matrix.dim.sizesDetermine the sizes of the CIFTI matrix dimensions.
cifti.merge.axesMerge explicitly given axes with the axes of a template.
cifti.model.typesThe CIFTI-2 brain model types.
cifti.nifti.header.for.axesBuild the NIFTI-2 header of a CIFTI-2 file.
cifti.other.dimGet the other matrix dimension of a 2-dimensional CIFTI-2...
cifti.parcelCreate a CIFTI-2 parcel.
cifti.parcelsGet the parcel table of a CIFTI-2 file.
cifti.parcels.axis.ofGet the parcels axis of a template file.
cifti.parse.attrRead and validate an attribute value of an XML node.
cifti.parse.brain.modelsParse the BrainModel elements of a MatrixIndicesMap element.
cifti.parse.child.int.vectorParse a required or optional child element holding integer...
cifti.parse.child.voxel.indicesParse the optionally present VoxelIndicesIJK child element as...
cifti.parse.indices.mapParse one MatrixIndicesMap element.
cifti.parse.int.vectorParse a whitespace-separated list of integers from XML text...
cifti.parse.label.tableParse a CIFTI LabelTable element.
cifti.parse.metadataParse the MetaData element of a CIFTI XML node.
cifti.parse.named.mapsParse the NamedMap elements of a MatrixIndicesMap element.
cifti.parse.numeric.vectorParse a whitespace-separated list of numbers from XML text...
cifti.parse.parcelsParse the Parcel elements of a MatrixIndicesMap element.
cifti.parse.seriesParse the series attributes of a MatrixIndicesMap element.
cifti.parse.surfacesParse the Surface elements of a MatrixIndicesMap element.
cifti.parse.volumesParse the Volume elements of a MatrixIndicesMap element.
cifti.parse.xmlParse the CIFTI XML metadata.
cifti.prepare.surface.dataPrepare per-vertex data for writing to a CIFTI-2 file.
cifti.read.matrixRead the data matrix of a CIFTI-2 file.
cifti.read.rowsRead the requested matrix rows of a CIFTI-2 file.
cifti.read.valuesRead raw values from the data section of a CIFTI-2 file.
cifti.region.name.without.hemisphereRemove hemisphere markers from region names of a...
cifti.series.infoGet the series information of a CIFTI-2 file.
cifti.stop.if.ciftiRefuse to read a CIFTI file as a volume or morphometry file.
cifti.stop.if.cifti.nameRefuse a CIFTI-2 file name for a file that is not a CIFTI-2...
cifti.structure.canonicalNormalize a CIFTI brain structure name.
cifti.structure.dataExtract the data of one brain structure from a CIFTI-2 file.
cifti.structure.data.dimGet the matrix dimension a brain structure lives in.
cifti.structure.data.oneExtract the data of one brain structure (internal).
cifti.structure.from.specifierResolve a user-supplied structure specifier to a canonical...
cifti.structuresGet the brain model table of a CIFTI-2 file.
cifti.structure.shortGet the short name of a CIFTI brain structure.
cifti.subset.dimSubset one dimension of an array.
cifti.surface.vertex.countGet the number of vertices of one surface of a CIFTI-2...
cifti.surface.vertex.countsGet the number of vertices of the surfaces declared in a...
cifti.validate.axesValidate the axes of a CIFTI-2 file.
cifti.validate.brain.modelsValidate the brain model entries of a CIFTI mapping.
cifti.validate.dims.coverageCheck that all matrix dimensions are described exactly once.
cifti.validate.file.extensionCheck the file extension against the axes of the data.
cifti.validate.index.rangeCheck that all indices are within a valid range.
cifti.validate.indices.mapValidate a parsed CIFTI MatrixIndicesMap.
cifti.validate.parcelsValidate the parcels of a CIFTI mapping.
cifti.validate.read.sizeCheck the safety limit for reading a CIFTI-2 data matrix.
cifti.volumeCreate a CIFTI-2 axis for a volume.
cifti.xml.add.indices.mapAdd a MatrixIndicesMap element to the Matrix element.
cifti.xml.add.metadataAdd a MetaData element to an XML node.
cifti.xml.int.vectorFormat an integer vector for an XML text node.
cifti.xml.numFormat a number like the reference implementations do.
cifti.xml.num.vectorFormat a numeric vector for an XML text node.
cifti.xml.versionThe CIFTI version this package writes.
closest.vert.to.pointFind vertex index closest to given query coordinate using...
colortable.from.annotExtract color lookup table (LUT) from annotation.
coord.bboxCompute the bounding box of a set of coordinates.
coord.to.keyTurn coordinate vector into string.
delete_all_opt_dataDelete all data in the package cache.
detect.dti.tract.formatDetect the format of a DTI tract file.
doapply.transform.mtxApply a spatial transformation matrix to the given...
dot-canonicalize.gradient.tableBring a gradient table into the canonical 'one row per...
dot-cifti.label.table.for.usersConvert a label table to the format the package has always...
dot-dti.bzero.thresholdGet the b-value threshold below which a volume counts as a...
dot-find.bval.fileFind the b-value file that belongs to a b-vector file.
dot-format.gradient.valuesFormat numeric values for a gradient table text file.
dot-format.header.sizeFormat a possibly missing TRK header size for an error...
dot-name.gradient.table.columnsName the columns of an MRtrix gradient table.
dot-read.dti.tcktsfRead DTI tracking data from MRtrix TCK and TSF files.
dot-read.numeric.tableRead a whitespace-separated numeric table from a text file.
dot-write.numeric.tableWrite a numeric table to a text file, one matrix row per...
download_opt_dataDownload optional data for the freesurferformats package.
dti.track.bboxCompute the bounding box of all tract coordinates in a file.
dti.track.countCount the tracts in a DTI tract file.
dti.track.iteratorCreate an iterator over the tracts of a DTI tract file.
euclidian.distCompute Euclidean distance.
faces.quad.to.trisConvert quadrangular faces or polygons to triangular ones.
faces.tris.to.quadConvert tris faces to quad faces by simple merging.
fileopen.gz.or.notGet connection to a binary file, gz or not.
fileopen.write.gz.or.notOpen a connection for writing, with gzip support based on the...
filepath.ends.withCheck whether filepath ends with extension.
finite.rowsCheck which rows of a matrix consist of finite values only.
fixed.vec.format.intWrite fixed width integers to one or several lines.
flip2DFlip a 2D matrix.
flip3DFlip a 3D array along an axis.
format_bytes_humanFormat a number of bytes for human consumption.
fread3Read 3-byte integer.
fs.get.morph.file.ext.for.formatDetermine morphometry file extension from format
fs.get.morph.file.format.from.filenameDetermine morphometry file format from filename
fsl.scaled.voxel.matrixCompute the matrix that maps FSL voxel coordinates of a...
fs.patchConstructor for fs.patch
fs.surface.to.tmesh3dGet an rgl tmesh3d instance from a brain surface mesh.
fs.tractsCreate an fs.tracts instance from a compact tract...
fs.tracts.coordsGet the concatenated coordinates of fs.tracts instances.
fs.tracts.countGet the number of tracts.
fs.tracts.lengthsGet the number of points of each tract.
fs.tracts.point.countGet the total number of points of all tracts.
fs.transformCreate an fs.transform instance.
fwrite3Write 3-byte integer.
get.dti.trk.endiannessDetermine endianness of TRK file.
get_max_alloc_bytesGet the configured maximum allocation size in bytes.
get_opt_data_filepathAccess a single file from the package cache by its file name.
get.slice.orientationCompute MGH orientation string and direction
gifti_writerWrite data to a gifti file.
gifti_xmlGet GIFTI XML representation of data.
gifti_xml_add_global_metadataAdd metadata to GIFTI XML tree.
giftixml_add_labeltable_from_annotAdd a label tabel from an annotation to a GIFTI XML tree.
giftixml_add_labeltable_posnegAdd a standard label tabel for to a GIFTI XML tree.
gifti_xml_writeWrite XML tree to a gifti file.
groups.in.bboxCheck which groups have at least one point inside a box.
group.start.rowsCompute the first row of every group in a concatenated...
guess.filename.is.gzippedGuess whether a file is gzipped.
guess.transform.formatDetermine the format of a transformation file.
guess.writable.transform.formatDetermine the format of a transformation file to write.
has_pandocCheck for pandoc availability on system.
infinite.rowsCheck which rows of a matrix consist of infinite values only.
int.to.col.brainvoyagerConvert 32 bit integer to RGB color as described in...
invert.fs.transformInvert a transformation.
inv.ornt.affBuild the affine that undoes an orientation transform.
io.orientationDetermine the orientation of an affine's input axes.
is.analyze.fileCheck whether a file is an ANALYZE 7.5 file.
is.bvsmpCheck whether object is a bvsmp instance.
is.fs.annotCheck whether object is an fs.annot
is.fs.labelCheck whether object is an fs.label
is.fs.surfaceCheck whether object is an fs.surface
is.fs.tractsCheck whether an object is an fs.tracts instance.
is.fs.transformCheck whether an object is an fs.transform instance.
is.fs.volumeCheck whether object is an fs.volume
is.gzip.fileCheck whether a file is gzip-compressed, based on its magic...
is.identity.matrixCheck whether a matrix is (close to) the identity.
is.mghheaderCheck whether object is an mghheader
is.mrtrix.end.lineCheck whether a header line terminates the MRtrix header.
itk.key.valueRead the value of a key of an ITK transform file.
itk.numeric.valueRead a numerical entry of an ITK transform file.
length.fs.tractsNumber of tracts in an fs.tracts instance.
linesplit.fixedSplit a string into fixed-length parts.
list_opt_dataGet file names available in package cache.
lta.volume.info.linesWrite the volume info section of an LTA file.
m44_to_quaternionCompute quaternion representation of a rotation from a 4x4...
merge.bboxMerge two bounding boxes.
mesh.face.normalsCompute the normals of the triangles of a mesh.
mghheaderConstructor to init MGH header instance.
mghheader.centervoxelRAS.from.firstvoxelRASCompute RAS coords of center voxel.
mghheader.crs.orientationCompute MGH volume orientation string.
mghheader.is.conformedDetermine whether an MGH volume is conformed.
mghheader.is.ras.validCheck whether header contains valid ras information
mghheader.primary.slice.directionCompute MGH primary slice direction
mghheader.ras2voxCompute ras2vox matrix from basic MGH header fields.
mghheader.ras2vox.tkregCompute ras2vox-tkreg matrix from basic MGH header fields.
mghheader.scanner2tkregCompute scanner-RAS 2 tkreg-RAS matrix from basic MGH header...
mghheader.tkreg2scannerCompute tkreg-RAS to scanner-RAS matrix from basic MGH header...
mghheader.update.from.vox2rasUpdate mghheader fields from vox2ras matrix.
mghheader.vox2rasCompute vox2ras matrix from basic MGH header fields.
mghheader.vox2ras.tkregCompute vox2ras-tkreg matrix from basic MGH header fields.
mghheader.vox2voxCompute vox2vox matrix between two volumes.
mgh.is.conformedDetermine whether an MGH volume is conformed.
mni152regGet fsaverage (MNI305) to MNI152 transformation matrix.
mri_dtype_numbytesGet size of MRI dtype in bytes.
mrtrix.track.iteratorCreate an iterator over the tracts of an MRtrix TCK or TSF...
next.buffer.capacityCompute the next capacity for a growing result buffer.
ni1header.for.dataCreate NIFTI v1 header suitable for given data.
ni1header.templateCreate a template NIFTI v1 header. You will have to adapt it...
ni2header.for.dataCreate NIFTI v2 header suitable for given data.
ni2header.templateCreate a template NIFTI v2 header. You will have to adapt it...
nifti2.extensionCreate a NIFTI v2 header extension.
nifti2.extension.contentGet the payload of a NIFTI v2 header extension as raw bytes.
nifti2.extension.sizeCompute the size of a NIFTI v2 header extension in a file.
nifti2.extension.textGet the payload of a NIFTI v2 header extension as text.
nifti2.get.extensionGet a NIFTI v2 header extension by code.
nifti2.read.extensionsRead the header extensions of a NIFTI v2 file.
nifti2.strip.nulRemove NUL bytes from a raw vector.
nifti2.trailing.nul.removedRemove trailing NUL bytes from a raw vector.
nifti2.write.extensionsWrite the header extensions of a NIFTI v2 file.
nifti.datadim.from.dimfieldCompute data dimensions from the 'dim' field of the NIFTI (v1...
nifti.datadim.to.dimfieldCompute NIFTI dim field for data dimension.
nifti.dtypebitpix.info.from.mgh.dtypeCompute the 'datatype' and 'bitpix' fields used in the NIFTI1...
nifti.dtype.infoCompute NIFTI v1 data type info from datatype and bitpix...
nifti.field.check.lengthCheck whether vector has expected length.
nifti.field.check.nchar.maxCheck whether character string fields have less than or equal...
nifti.file.uses.fshackDetermine whether a NIFTI file uses the FreeSurfer hack.
nifti.file.versionDetermine NIFTI file version information and whether file is...
nifti.header.checkPerform basic sanity checks on NIFTI header data. These are...
nifti.header.to.vox2rasCompute the voxel-to-RAS matrix from the geometry fields of a...
nifti.info.from.fileRead the header information and the data of a NIFTI file into...
nifti.info.from.oro.instanceExtract the header information and the data of an 'oro.nifti'...
nifti.resolve.filepathResolve the path of a NIFTI file which is given without a...
nifti.space.infoCompute NIFTI space unit info from xyzt_units header field.
nifti.time.infoCompute NIFTI time unit info from xyzt_units header field.
nifti.transform.type.nameGet the name of the transform type from a form code.
nii1header.for.mghCreate a NIFTI v1 header from the header information...
nrrd.dwi.infoParse the diffusion metadata of a NRRD header.
nrrd.fieldLook up a field in a parsed NRRD header.
nrrd.field.keyParse a NRRD header field name into a lookup key.
nrrd.parse.field.valueParse a NRRD header field value.
nrrd.parse.headerParse the header lines of a NRRD file.
nrrd.parse.matrixParse a NRRD matrix value like '(1,0,0) (0,1,0) (0,0,1)'.
nrrd.parse.quoted.listParse a quoted NRRD string list.
nrrd.parse.vectorParse a NRRD vector value like '(1,2,3)'.
nrrd.parse.vector.listParse a NRRD vector list value like '(1,0,0) (0,1,0)...
nrrd.raw.to.numericConvert raw bytes of wide integer types into numbers.
nrrd.read.dataRead the data section of a NRRD file.
nrrd.read.header.linesRead the ASCII header of a NRRD file.
nrrd.read.remainderRead the remaining bytes of a connection.
nrrd.read.valuesRead NRRD values from a connection or a file.
nrrd.resolve.data.filesResolve the data location of a NRRD file.
nrrd.skip.linesSkip whole lines of a connection.
nrrd.type.infoConvert the NRRD type name of a volume into R data type...
nrrd.vox2rasCompute the voxel-to-RAS matrix of a NRRD volume.
open.maybe.gzipOpen a connection that transparently handles gzip...
open.mrtrix.payloadOpen the payload of an MRtrix TCK/TSF file for reading.
ornt2axcodesConvert an orientation array to axis codes.
ornt.transformDetermine the orientation transform between two orientations.
parse.mrtrix.countParse the 'count' entry of an MRtrix TCK/TSF header.
parse.mrtrix.datatypeValidate and describe the datatype entry of an MRtrix TCK/TSF...
parse.mrtrix.file.entryParse the 'file' entry of an MRtrix TCK/TSF header.
parse.mrtrix.headerParse the key-value pairs of an MRtrix TCK/TSF header.
parse.mrtrix.write.datatypeParse and validate the datatype of an MRtrix streamlines...
parse.stl.ascii.faceParse a single ASCII STL face.
parse.transform.matrix.linesParse matrix from text file lines.
ply.header.linesGenerate PLY format header lines
polygon.soup.to.indexed.meshTurn polygon soup into indexed mesh.
print.dti.track.iteratorPrint a tract file iterator.
print.fs.annotPrint description of a brain atlas or annotation.
print.fs.ciftiPrint an fs.cifti instance.
print.fs.cifti.dataPrint an fs.cifti.data instance.
print.fs.connectomePrint an fs.connectome instance.
print.fs.labelPrint description of a brain surface label.
print.fs.patchPrint description of a brain surface patch.
print.fs.surfacePrint description of a brain surface.
print.fs.tractsPrint an fs.tracts instance.
print.fs.transformPrint an fs.transform instance.
print.fs.volumePrint description of a brain volume.
ras.to.surfacerasTranslate RAS coordinates, as used in volumes by applying...
ras.to.talairachrasCompute MNI talairach coordinates from RAS coords.
readable.filesFind files with the given base name and extensions that...
read.analyze.dataRead ANALYZE 7.5 data from file.
read.analyze.headerRead ANALYZE 7.5 header from file.
read.ciftiRead a CIFTI-2 file.
read.cifti.headerRead CIFTI-2 header (XML metadata).
read.cifti.rowsRead selected matrix rows of a CIFTI-2 file without loading...
readcolortableRead binary colortable in v2 format.
readcolortable_oldformatRead binary colortable in old format.
read.dti.bvalRead b-values from a FSL-style bvals file.
read.dti.bvecRead b-vectors from a FSL-style bvecs file.
read.dti.gradRead a gradient table in MRtrix3 format.
read.dti.gradientsRead and validate a diffusion MRI gradient table.
read.dti.tckRead DTI tracking data from file in MRtrix 'TCK' format.
read.dti.tck.headerRead the header of a file in MRtrix 'TCK' or 'TSF' format.
read.dti.trkRead fiber tracks from Diffusion Toolkit in trk format.
read.dti.trk.headerRead the header of a TrackVis TRK file.
read.dti.tsfRead DTI tracking per-coord data from file in MRtrix 'TSF'...
read.dti.tsf.headerRead the header of a file in MRtrix 'TSF' format.
read.element.counts.ply.headerDetermine element counts from PLY file header.
read.fixed.char.binaryRead fixed length char, possibly containing embedded zeroes,...
read.fs.annotRead file in FreeSurfer annotation format
read.fs.annot.giiRead an annotation or label in GIFTI format.
read.fs.colortableRead colortable file in FreeSurfer ASCII LUT format.
read.fs.connectome.ciftiRead a CIFTI-2 connectome file.
read.fs.curvRead file in FreeSurfer curv format
read.fs.gcaRead FreeSurfer GCA file.
read.fs.labelRead a label file.
read.fs.label.giiRead a label from a GIFTI label/annotation file.
read.fs.label.nativeRead file in FreeSurfer label format
read.fs.mghRead file in FreeSurfer MGH or MGZ format
read.fs.morphRead morphometry data file in any FreeSurfer format.
read.fs.morph.ascRead morphometry data from ASCII curv format file
read.fs.morph.bvsmpRead Brainvoyager vertex-wise statistical surface data from...
read.fs.morph.ciftiRead surface morphometry data from CIFTI dscalar files.
read.fs.morph.giiRead morphometry data file in GIFTI format.
read.fs.morph.ni1Read morphometry data from FreeSurfer NIFTI v1 format files.
read.fs.morph.ni2Read morphometry data from FreeSurfer NIFTI v2 format files.
read.fs.morph.niiRead morphometry data from FreeSurfer NIFTI format files,...
read.fs.morph.txtRead morphometry data from plain text file
read.fs.parcellation.ciftiRead surface parcellation data from CIFTI dlabel files.
read.fs.patchRead FreeSurfer binary or ASCII patch file.
read.fs.patch.ascRead FreeSurfer ASCII format patch.
read.fs.series.ciftiRead surface time series data from CIFTI dtseries files.
read.fs.surfaceRead file in FreeSurfer surface format or various mesh...
read.fs.surface.ascRead FreeSurfer ASCII format surface.
read.fs.surface.bvsrfRead Brainvoyager srf format (.srf) mesh as surface.
read.fs.surface.byuRead mesh in BYU format.
read.fs.surface.geoRead GEO format mesh as surface.
read.fs.surface.giiRead GIFTI format mesh as surface.
read.fs.surface.icoRead ICO format mesh as surface.
read.fs.surface.mz3Read surface mesh in mz3 format, used by Surf-Ice.
read.fs.surface.objRead OBJ format mesh as surface.
read.fs.surface.offRead Object File Format (OFF) mesh as surface.
read.fs.surface.plyRead Stanford PLY format mesh as surface.
read.fs.surface.stlRead mesh in STL format, auto-detecting ASCII versus binary...
read.fs.surface.stl.asciiRead surface mesh in STL ASCII format.
read.fs.surface.stl.binRead surface mesh in STL binary format.
read.fs.surface.vtkRead VTK legacy format mesh as surface.
read.fs.tracts.vtkRead VTK legacy format streamlines as tracts.
read.fs.transformLoad transformation matrix from a file.
read.fs.transform.datLoad transformation matrix from a tkregister dat file.
read.fs.transform.fslmatRead a transformation matrix from an FSL matrix file.
read.fs.transform.itkRead a transformation matrix from an ITK text transform file.
read.fs.transform.ltaLoad transformation matrix from a FreeSurfer linear transform...
read.fs.transform.xfmLoad transformation matrix from an XFM file.
read.fs.volumeRead volume file in MGH, MGZ or NIFTI format
read.fs.volume.analyzeRead an ANALYZE 7.5 or NIFTI v1 pair file as an fs.volume.
read.fs.volume.niiRead a 3D or 4D NIFTI file into an 'fs.volume' instance with...
read.fs.volume.nrrdRead volume data from a file in NRRD format.
read.fs.weightRead file in FreeSurfer weight or w format
read.fs.weight.ascRead ASCII version of FreeSurfer weight file.
read.matlab.v4.matrixRead the matrices of a MATLAB v4 data file.
read.mesh.brainvoyagerRead Brainvoyager srf format (.srf) mesh.
read.mrtrix.headerRead the ASCII header of an MRtrix TCK/TSF file.
read.mrtrix.streamRead the data payload of an MRtrix TCK/TSF file.
read.nifti1.dataRead raw NIFTI v1 data from file (which may contain the...
read.nifti1.headerRead NIFTI v1 header from file (which may contain the...
read.nifti1.header.internalRead NIFTI v1 header from file (which may contain the...
read.nifti2.dataRead raw data from NIFTI v2 file.
read.nifti2.headerRead NIFTI v2 header from file.
read.nifti2.header.internalRead NIFTI v2 header from file.
read.nifti.valuesRead raw voxel values of a NIFTI v1/v2 or ANALYZE file from a...
read_nisurfaceRead a surface, based on the file path without extension.
read_nisurfacefileS3 method to read a neuroimaging surface file.
read_nisurfacefile.fsasciiRead a FreeSurfer ASCII surface file.
read_nisurfacefile.fsnativeRead a FreeSurfer ASCII surface file.
read_nisurfacefile.giftiRead a gifti file as a surface.
read.nrrd.headerRead the header of a file in NRRD format.
read_safe_binSafe wrapper around readBin that verifies the number of...
read.smp.brainvoyagerRead Brainvoyager statistical surface results from SMP file.
read.smp.brainvoyager.v1or2Read Brainvoyager statistical surface results from v1 or v2...
read.smp.brainvoyager.v3Read Brainvoyager statistical surface results from v3 SMP...
read.smp.brainvoyager.v4or5Read Brainvoyager statistical surface results from v4 or v5...
read.trk.recordsRead the track records of a TRK file.
read.vtk.legacy.polydataRead a VTK legacy file with a POLYDATA dataset.
rotate2DRotate a 2D matrix in 90 degree steps.
rotate3DRotate a 3D array in 90 degree steps.
rotate90Rotate 2D matrix clockwise in 90 degree steps.
scan.dti.tract.fileScan a tract file without holding its data in memory.
scan.mrtrix.fileScan an MRtrix TCK or TSF file.
scannScan exactly n values from source string.
scan.trk.fileScan a TRK file.
skip.connection.bytesSkip over bytes of a connection, transparently handling gzip.
sm0to1Adapt spatial transformation matrix for 1-based indices.
sm1to0Adapt spatial transformation matrix for 0-based indices.
split.mrtrix.chunkSplit one chunk of MRtrix payload values into streamlines.
stl.format.file.is.asciiGuess whether a mesh file in STL format is the ASCII or the...
sub-.fs.tractsSubset an fs.tracts instance.
subset.groupsExtract selected groups from a concatenated matrix.
sub-sub-.fs.tractsAccess a single tract of an fs.tracts instance.
summary.fs.transformSummarize an fs.transform instance.
surfaceras.to.rasTranslate surface RAS coordinates, as used in surface...
surfaceras.to.talairachCompute Talairach RAS for surface RAS (e.g., vertex...
talairachras.to.rasCompute MNI talairach coordinates from RAS coords.
text.line.is.numericCheck whether a text line holds a fixed number of numerical...
trackvis.affine.to.rasmmCompute the affine that maps TrackVis coordinates to RAS+ mm.
transform2lpsConvert a transformation to LPS world coordinates.
transform2rasConvert a transformation to RAS world coordinates.
transform2voxelConvert a transformation to voxel coordinates.
transform2worldConvert a transformation to the world (RAS) coordinate space.
transform.bboxTransform a bounding box with an affine.
transform.descriptor.pathGet the file path recorded in a volume descriptor.
transform.file.sniff.textExtract the text of a file for format sniffing.
transform.flip.handednessConvert a transformation between the LPS and the RAS...
transform.geometry.for.sideDetermine the volume geometry of one side of a...
transform.matrix.row.linesFormat the rows of a transformation matrix for a text file.
transform.values.textFormat numerical values for a transformation text file.
transform.value.textFormat a single numerical value for a transformation text...
transform.world.frameDetermine the frame of the world space of a transformation.
translate.mri.dtypeTranslate between code and name of MRI data types.
trk.track.iteratorCreate an iterator over the tracts of a TRK file.
validate_allocation_sizeValidate that a requested allocation does not exceed the...
validate.bboxValidate a bounding box argument.
validate.dti.gradientsValidate and normalize a diffusion MRI gradient table.
validate.fs.transformCheck whether an object is a valid fs.transform instance.
vertexdists.to.pointCompute Euclidean distance from all mesh vertices to given...
vertex.euclid.distCompute Euclidean distance between two vertices v1 and v2.
volume.descriptorDescribe a volume for an fs.transform.
volume.geometryGet the geometry of a volume.
vtk.as.indicesConvert values that are used as indices to integers.
vtk.cell.section.layoutDetermine how the cell array of a section is stored.
vtk.check.trianglesCheck that all cells of the requested type are triangles.
vtk.data.type.infoGet the on-disk properties of a VTK legacy data type.
vtk.next.lineRead the next line of an ASCII VTK legacy file.
vtk.next.sectionRead the next section header line of a VTK legacy file.
vtk.parse.cell.sectionRead the cell array of a VTK legacy section.
vtk.parse.countRead a non-negative integer from a VTK section header.
vtk.peek.lineLook at the next line of an ASCII VTK legacy file.
vtk.reader.bytesConsume bytes from a VTK legacy reader.
vtk.reader.closeClose the connection of a VTK legacy reader.
vtk.reader.fillFill the lookahead buffer of a VTK legacy reader.
vtk.reader.newCreate the low-level state used while reading a VTK legacy...
vtk.reader.numbersRead numeric values from a binary VTK legacy file.
vtk.reader.peekRead bytes from a VTK legacy reader without consuming them.
vtk.read.headerRead the header of a VTK legacy file and set up the reader.
vtk.section.valuesRead numeric values from a VTK legacy section.
vtk.section.values.asciiRead numeric values from an ASCII VTK legacy section.
vtk.split.lineSplit a line of a VTK legacy file into whitespace separated...
vtk.write.surface.asciiWrite the sections of a triangular mesh in VTK ASCII format.
vtk.write.surface.binaryWrite the sections of a triangular mesh in binary VTK format.
write.analyzeWrite data to a file in ANALYZE 7.5 format.
write.analyze.char.fieldWrite a fixed length character field of an ANALYZE 7.5...
write.analyze.header.internalWrite the 348 byte ANALYZE 7.5 header to a connection.
write.atlas.to.lut.and.csvWrite a brain atlas to a colortable (LUT) file and a...
write.ciftiWrite a CIFTI-2 file.
write.dti.bvalWrite b-values to a FSL-style bvals file.
write.dti.bvecWrite b-vectors to a FSL-style bvecs file.
write.dti.gradWrite a gradient table in MRtrix3 format.
write.dti.tckWrite tracks to a file in MRtrix TCK format.
write.dti.trkWrite tracks to a file in TrackVis TRK format.
write.dti.tsfWrite per-point track values to a file in MRtrix TSF format.
write.fs.annotWrite annotation to binary file.
write.fs.annot.giiWrite annotation to GIFTI file.
write.fs.colortableWrite colortable file in FreeSurfer ASCII LUT format.
write.fs.connectome.ciftiWrite a CIFTI-2 connectome file.
write.fs.curvWrite file in FreeSurfer curv format
write.fs.labelWrite vertex indices to file in FreeSurfer label format
write.fs.label.giiWrite a binary surface label in GIFTI format.
write.fs.mghWrite file in FreeSurfer MGH or MGZ format
write.fs.morphWrite morphometry data in a format derived from the given...
write.fs.morph.ascWrite file in FreeSurfer ASCII curv format
write.fs.morph.ciftiWrite morphometry data to a CIFTI-2 '.dscalar' file.
write.fs.morph.giiWrite morphometry data in GIFTI format.
write.fs.morph.ni1Write morphometry data in NIFTI v1 format.
write.fs.morph.ni2Write morphometry data in NIFTI v2 format.
write.fs.morph.smpWrite morphometry data in Brainvoyager SMP format.
write.fs.morph.txtWrite curv data to file in simple text format
write.fs.parcellated.ciftiWrite a CIFTI-2 parcellated map or series file.
write.fs.parcellation.ciftiWrite a parcellation to a CIFTI-2 '.dlabel' file.
write.fs.patchWrite a surface patch
write.fs.series.ciftiWrite time series data to a CIFTI-2 '.dtseries' file.
write.fs.surfaceWrite mesh to file in FreeSurfer binary surface format
write.fs.surface.ascWrite mesh to file in FreeSurfer ASCII surface format
write.fs.surface.bvsrfWrite surface to Brainvoyager SRF file.
write.fs.surface.byuWrite mesh to file in BYU ASCII format.
write.fs.surface.giiWrite mesh to file in GIFTI surface format
write.fs.surface.mz3Write mesh to file in mz3 binary format.
write.fs.surface.objWrite mesh to file in Wavefront object (.obj) format
write.fs.surface.offWrite mesh to file in Object File Format (.off)
write.fs.surface.off.ply2Write mesh to file in Object File Format (.off) or PLY2...
write.fs.surface.plyWrite mesh to file in PLY format (.ply)
write.fs.surface.ply2Write mesh to file in PLY2 File Format (.ply2)
write.fs.surface.stlWrite mesh to file in STL format (ASCII or binary).
write.fs.surface.vtkWrite mesh to file in VTK legacy format
write.fs.transformWrite a transformation matrix to a file.
write.fs.transform.datWrite a tkregister dat file.
write.fs.transform.fslmatWrite a transformation matrix in FSL format.
write.fs.transform.itkWrite an ITK text transform file.
write.fs.transform.ltaWrite a FreeSurfer linear transform array (LTA) file.
write.fs.transform.xfmWrite an MNI transform (xfm) file.
write.fs.volumeWrite an fs.volume instance to a file in MGH, MGZ or NIFTI v1...
write.fs.weightWrite file in FreeSurfer weight format
write.fs.weight.ascWrite file in FreeSurfer weight ASCII format
write.mrtrix.streamlinesWrite the payload of an MRtrix streamlines file.
write.nifti1Write header and data to a file in NIFTI v1 format.
write.nifti1.data.internalWrite the voxel data of a NIFTI v1 file to a connection.
write.nifti1.header.internalWrite the 348 byte NIFTI v1 header (and the padding up to the...
write.nifti2Write header and data to a file in NIFTI v2 format.
write.smp.brainvoyagerWrite a brainvoyager SMP file.
write.smp.brainvoyager.v2Write a brainvoyager v2 SMP file.
write.smp.brainvoyager.v3or4or5Write a brainvoyager v3, v4 or v5 SMP file.
write.stl.asciiWrite the sections of a triangular mesh in ASCII STL format.
write.stl.binaryWrite the sections of a triangular mesh in binary STL format.
write.trk.headerWrite the 1000 byte header of a TRK file.
xml_node_gifti_coordtransformCreate XML GIFTI CoordinateSystemTransformMatrix node.
xml_node_gifti_labelCreate XML GIFTI Label node.
xml_node_gifti_label_tableCreate XML GIFTI LabelTable node.
xml_node_gifti_label_table_from_annotCompute LabelTable node from annotation.
xml_node_gifti_MDCreate XML GIFTI metadata node.
freesurferformats documentation built on Sept. 25, 2026, 1:07 a.m.