diff --git a/man/guess.filename.is.gzipped.Rd b/man/guess.filename.is.gzipped.Rd index cd06e28..0f9f659 100644 --- a/man/guess.filename.is.gzipped.Rd +++ b/man/guess.filename.is.gzipped.Rd @@ -7,9 +7,9 @@ guess.filename.is.gzipped(filepath, gz_entensions = c(".gz", ".mgz")) } \arguments{ -\item{filepath, }{string. Path to a file.} +\item{filepath}{string. Path to a file.} -\item{gz_entensions, }{list of strings. A list of suffixes that is considered indicative for the file being gzipped. Defaults to c(".gz", ".mgz"). Case does not matter.} +\item{gz_entensions}{list of strings. A list of suffixes that is considered indicative for the file being gzipped. Defaults to c(".gz", ".mgz"). Case does not matter.} } \value{ logical, whether this function thinks the file is gzipped. diff --git a/man/read.fs.annot.Rd b/man/read.fs.annot.Rd index 862721a..b9f9557 100644 --- a/man/read.fs.annot.Rd +++ b/man/read.fs.annot.Rd @@ -7,9 +7,9 @@ read.fs.annot(filepath, empty_label_name = "unknown") } \arguments{ -\item{filepath, }{string. Full path to the input annotation file. Note: gzipped files are supported and gz format is assumed if the filepath ends with ".gz".} +\item{filepath}{string. Full path to the input annotation file. Note: gzipped files are supported and gz format is assumed if the filepath ends with ".gz".} -\item{empty_label_name, }{string. The region name to assign to regions with empty name. Defaults to 'unknown'. Set to NULL if you want to keep the empty region name.} +\item{empty_label_name}{string. The region name to assign to regions with empty name. Defaults to 'unknown'. Set to NULL if you want to keep the empty region name.} } \value{ named list, enties are: "vertices" vector of n vertex indices, starting with 0. "label_codes": vector of n integers, each entry is a color code, i.e., a value from the 5th column in the table structure included in the "colortable" entry (see below). "label_names": the n brain structure names for the vertices, already retrieved from the colortable using the code. "hex_colors_rgb": Vector of hex color for each vertex. diff --git a/man/read.fs.curv.Rd b/man/read.fs.curv.Rd index 5ca561f..1ce5d16 100644 --- a/man/read.fs.curv.Rd +++ b/man/read.fs.curv.Rd @@ -7,10 +7,10 @@ read.fs.curv(filepath) } \arguments{ -\item{filepath, }{string. Full path to the input curv file. Note: gzipped files are supported and gz format is assumed if the filepath ends with ".gz".} +\item{filepath}{string. Full path to the input curv file. Note: gzipped files are supported and gz format is assumed if the filepath ends with ".gz".} } \value{ -data, vector of floats. The brain morphometry data, one value per vertex. +data vector of floats. The brain morphometry data, one value per vertex. } \description{ Read vertex-wise brain mophometry data from a file in FreeSurfer binary 'curv' format. diff --git a/man/read.fs.label.Rd b/man/read.fs.label.Rd index d90bf5c..757d0b2 100644 --- a/man/read.fs.label.Rd +++ b/man/read.fs.label.Rd @@ -7,9 +7,9 @@ read.fs.label(filepath, return_one_based_indices = TRUE) } \arguments{ -\item{filepath, }{string. Full path to the input label file.} +\item{filepath}{string. Full path to the input label file.} -\item{return_one_based_indices, }{logical. Whether the indices should be 1-based. Indices are stored zero-based in the file, but R uses 1-based indices. Defaults to TRUE, which means that 1 will be added to all indices read from the file before returning them.} +\item{return_one_based_indices}{logical. Whether the indices should be 1-based. Indices are stored zero-based in the file, but R uses 1-based indices. Defaults to TRUE, which means that 1 will be added to all indices read from the file before returning them.} } \value{ vector of integers. The vertex indices from the label file. See the parameter 'return_one_based_indices' for important information regarding the start index. diff --git a/man/read.fs.mgh.Rd b/man/read.fs.mgh.Rd index 1a39067..065bb1b 100644 --- a/man/read.fs.mgh.Rd +++ b/man/read.fs.mgh.Rd @@ -8,13 +8,13 @@ read.fs.mgh(filepath, is_gzipped = "AUTO", flatten = FALSE, with_header = FALSE) } \arguments{ -\item{filepath, }{string. Full path to the input MGZ or MGH file.} +\item{filepath}{string. Full path to the input MGZ or MGH file.} -\item{is_gzipped, }{a logical value (TRUE or FALSE) or the string 'AUTO'. Whether to treat the input file as gzipped, i.e., MGZ instead of MGH format. Defaults to 'AUTO', which tries to determine this from the last three characters of the 'filepath' parameter. Files with extensions 'mgz' and '.gz' (in arbitrary case) are treated as MGZ format, all other files are treated as MGH. In the special case that 'filepath' has less than three characters, MGH is assumed.} +\item{is_gzipped}{a logical value (TRUE or FALSE) or the string 'AUTO'. Whether to treat the input file as gzipped, i.e., MGZ instead of MGH format. Defaults to 'AUTO', which tries to determine this from the last three characters of the 'filepath' parameter. Files with extensions 'mgz' and '.gz' (in arbitrary case) are treated as MGZ format, all other files are treated as MGH. In the special case that 'filepath' has less than three characters, MGH is assumed.} -\item{flatten, }{logical. Whether to flatten the return volume to a 1D vector. Useful if you know that this file contains 1D morphometry data.} +\item{flatten}{logical. Whether to flatten the return volume to a 1D vector. Useful if you know that this file contains 1D morphometry data.} -\item{with_header, }{logical. Whether to return the header as well. If TRUE, return a named list with entries "data" and "header". The latter is another named list which contains the header data. These header entries exist: "dtype": int, one of: 0=MRI_UCHAR; 1=MRI_INT; 3=MRI_FLOAT; 4=MRI_SHORT. "voldim": integer vector. The volume (=data) dimensions. E.g., c(256, 256, 256, 1). These header entries may exist: "vox2ras_matrix" (exists if "ras_good_flag" is 1), "mr_params" (exists if "has_mr_params" is 1).} +\item{with_header}{logical. Whether to return the header as well. If TRUE, return a named list with entries "data" and "header". The latter is another named list which contains the header data. These header entries exist: "dtype": int, one of: 0=MRI_UCHAR; 1=MRI_INT; 3=MRI_FLOAT; 4=MRI_SHORT. "voldim": integer vector. The volume (=data) dimensions. E.g., c(256, 256, 256, 1). These header entries may exist: "vox2ras_matrix" (exists if "ras_good_flag" is 1), "mr_params" (exists if "has_mr_params" is 1).} } \value{ data, multi-dimensional array. The brain imaging data, one value per voxel. The data type and the dimensions depend on the data in the file, they are read from the header. If the parameter flatten is TRUE, a numeric vector is returned instead. Note: The return value changes if the parameter with_header is TRUE, see parameter description. diff --git a/man/read.fs.surface.Rd b/man/read.fs.surface.Rd index be5aa84..3081949 100644 --- a/man/read.fs.surface.Rd +++ b/man/read.fs.surface.Rd @@ -7,7 +7,7 @@ read.fs.surface(filepath) } \arguments{ -\item{filepath, }{string. Full path to the input curv file. Note: gzipped files are supported and gz format is assumed if the filepath ends with ".gz".} +\item{filepath}{string. Full path to the input curv file. Note: gzipped files are supported and gz format is assumed if the filepath ends with ".gz".} } \value{ named list. The list has the following named entries: "vertices": nx3 double matrix, where n is the number of vertices. Each row contains the x,y,z coordinates of a single vertex. "faces": nx3 integer matrix. Each row contains the vertex indices of the 3 vertices defining the face. WARNING: The indices are returned starting with index 1 (as used in GNU R). Keep in mind that you need to adjust the index (by substracting 1) to compare with data from other software. "vertex_indices_fs": list of n integers, where n is the number of vertices. The FreeSurfer vertex indices for the vertices. diff --git a/man/readcolortable.Rd b/man/readcolortable.Rd index 678145c..ffd8385 100644 --- a/man/readcolortable.Rd +++ b/man/readcolortable.Rd @@ -7,12 +7,12 @@ readcolortable(fh, ctable_num_entries) } \arguments{ -\item{fh:}{file handle} +\item{fh}{file handle} -\item{ctable_num_entries:}{number of entries to read} +\item{ctable_num_entries}{number of entries to read} } \value{ -named list: the color table. The named entries are: "num_entries": int, number of brain structures. "struct_names": vector of strings, the brain structure names. "table": numeric matrix with num_entries rows and 5 colums. The 5 columns are: 1 = color red channel, 2=color blue channel, 3=color green channel, 4=color alpha channel, 5=unique color code. +named list, the color table. The named entries are: "num_entries": int, number of brain structures. "struct_names": vector of strings, the brain structure names. "table": numeric matrix with num_entries rows and 5 colums. The 5 columns are: 1 = color red channel, 2=color blue channel, 3=color green channel, 4=color alpha channel, 5=unique color code. } \description{ Read a v2 format colortable from a connection to a binary file. diff --git a/man/readcolortable_oldformat.Rd b/man/readcolortable_oldformat.Rd index 8061907..bb84f47 100644 --- a/man/readcolortable_oldformat.Rd +++ b/man/readcolortable_oldformat.Rd @@ -7,12 +7,12 @@ readcolortable_oldformat(fh, ctable_num_entries) } \arguments{ -\item{fh:}{file handle} +\item{fh}{file handle} -\item{ctable_num_entries:}{number of entries to read} +\item{ctable_num_entries}{number of entries to read} } \value{ -named list: the color table. The named entries are: "num_entries": int, number of brain structures. "struct_names": vector of strings, the brain structure names. "table": numeric matrix with num_entries rows and 5 colums. The 5 columns are: 1 = color red channel, 2=color blue channel, 3=color green channel, 4=color alpha channel, 5=unique color code. +named list, the color table. The named entries are: "num_entries": int, number of brain structures. "struct_names": vector of strings, the brain structure names. "table": numeric matrix with num_entries rows and 5 colums. The 5 columns are: 1 = color red channel, 2=color blue channel, 3=color green channel, 4=color alpha channel, 5=unique color code. } \description{ Read an oldformat colortable from a connection to a binary file. diff --git a/man/write.fs.mgh.Rd b/man/write.fs.mgh.Rd index 4d5db03..55747ee 100644 --- a/man/write.fs.mgh.Rd +++ b/man/write.fs.mgh.Rd @@ -8,13 +8,13 @@ write.fs.mgh(filepath, data, vox2ras_matrix = NULL, mr_params = c(0, 0, 0, 0)) } \arguments{ -\item{filepath, }{string. Full path to the output curv file. If this ends with ".mgz", the file will be written gzipped (i.e., in MGZ instead of MGH format).} +\item{filepath}{string. Full path to the output curv file. If this ends with ".mgz", the file will be written gzipped (i.e., in MGZ instead of MGH format).} -\item{data, }{matrix of numerical values. The brain data to write. Must be integers or doubles. (The data type is set automatically to MRI_INT for integers and MRI_FLOAT for doubles in the MGH header).} +\item{data}{matrix of numerical values. The brain data to write. Must be integers or doubles. (The data type is set automatically to MRI_INT for integers and MRI_FLOAT for doubles in the MGH header).} -\item{vox2ras_matrix, }{4x4 matrix. An affine transformation matrix for the RAS transform that maps voxel indices in the volume to coordinates, such that for y(i1,i2,i3) (i.e., a voxel defined by 3 indices in the volume), the xyz coordinates are vox2ras_matrix*[i1 i2 i3 1]. If no matrix is given (or a NULL value), the ras_good flag will be 0 in the file. Defaults to NULL.} +\item{vox2ras_matrix}{4x4 matrix. An affine transformation matrix for the RAS transform that maps voxel indices in the volume to coordinates, such that for y(i1,i2,i3) (i.e., a voxel defined by 3 indices in the volume), the xyz coordinates are vox2ras_matrix*[i1 i2 i3 1]. If no matrix is given (or a NULL value), the ras_good flag will be 0 in the file. Defaults to NULL.} -\item{mr_params, }{double vector of length four. The acquisition parameters, in order: tr, flipangle, te, ti. The unit for the three times is ms, the angle unit is radians. Defaults to c(0, 0, 0, 0) if omitted.} +\item{mr_params}{double vector of length four. The acquisition parameters, in order: tr, flipangle, te, ti. The unit for the three times is ms, the angle unit is radians. Defaults to c(0, 0, 0, 0) if omitted.} } \description{ Write brain data to a file in FreeSurfer binary MGH or MGZ format. diff --git a/man/write.fs.surface.Rd b/man/write.fs.surface.Rd index 9125867..6ec36ed 100644 --- a/man/write.fs.surface.Rd +++ b/man/write.fs.surface.Rd @@ -7,14 +7,14 @@ write.fs.surface(filepath, vertex_coords, faces) } \arguments{ -\item{filepath, }{string. Full path to the output curv file. If it ends with ".gz", the file is written in gzipped format. Note that this is not common, and that other software may not handle this transparently.} +\item{filepath}{string. Full path to the output curv file. If it ends with ".gz", the file is written in gzipped format. Note that this is not common, and that other software may not handle this transparently.} -\item{vertex_coords, }{n x 3 matrix of doubles. Each row defined the x,y,z coords for a vertex.} +\item{vertex_coords}{n x 3 matrix of doubles. Each row defined the x,y,z coords for a vertex.} -\item{faces, }{n x 3 matrix of integers. Each row defined the 3 vertex indices that make up the face. WARNING: Vertex indices should be given in R-style, i.e., the index of the first vertex is 1. However, they will be written in FreeSurfer style, i.e., all indices will have 1 substracted, so that the index of the first vertex will be zero.} +\item{faces}{n x 3 matrix of integers. Each row defined the 3 vertex indices that make up the face. WARNING: Vertex indices should be given in R-style, i.e., the index of the first vertex is 1. However, they will be written in FreeSurfer style, i.e., all indices will have 1 substracted, so that the index of the first vertex will be zero.} } \value{ -string, the format that was written. One of "tris" or "quads". Currently only triangular meshes are supported, so always 'tris'. +string the format that was written. One of "tris" or "quads". Currently only triangular meshes are supported, so always 'tris'. } \description{ Write vertex coordinates and vertex indices defining faces to a file in FreeSurfer binary surface format.