Skip to content

Commit

Permalink
Merge pull request #60 from mandymejia/15.0
Browse files Browse the repository at this point in the history
15.0
  • Loading branch information
damondpham authored Jun 25, 2024
2 parents a51d7f4 + dc35790 commit 1b96cf0
Show file tree
Hide file tree
Showing 42 changed files with 510 additions and 465 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: ciftiTools
Type: Package
Title: Tools for Reading, Writing, Viewing and Manipulating CIFTI Files
Version: 0.14.0
Version: 0.15.1
Authors@R: c(
person(given = "Amanda",
family = "Mejia",
Expand Down Expand Up @@ -50,6 +50,7 @@ Suggests:
gridExtra,
htmlwidgets,
manipulateWidget,
webshot2,
knitr,
rmarkdown,
png,
Expand Down
2 changes: 1 addition & 1 deletion R/as.xifti.R
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
#' \code{\link{substructure_table}}. It is either a 3D data array
#' (\eqn{i \times j \times k}) of integer brainstructure indices, or a \eqn{V_S} length
#' vector in spatial order with brainstructure names as factors or integer
#' indices. The indices should be 3-21 (1 and 2 correspond to left and right
#' indices. The indices should be 3-22 (1 and 2 correspond to left and right
#' cortex, respectively) or 1-19 (cortex labels omitted), with 0 representing
#' out-of-mask voxels.
#'
Expand Down
7 changes: 7 additions & 0 deletions R/impute_xifti.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#' Impute \code{"xifti"} data
#'
#' Impute masked values using the values of adjacent, non-masked locations.
#'
#' @inheritParams xifti_Param
#' @param mask A logical vector whose length matches the number of rows in
#' \code{xifti} object.
6 changes: 4 additions & 2 deletions R/info_cifti.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ supported_intents <- function(){
#' Substructure table
#'
#' Table of labels for cortex hemispheres (left and right) and subcortical
#' substructures. The names used by the CIFTI format and the names used by
#' substructures. The same labels used by the HCP data are here, plus "Other".
#' Names from the CIFTI format ("CIFTI_STRUCTURE_*") and the names used by
#' \code{ciftiTools} are given.
#'
#' The names used by \code{ciftiTools} are based on those in
Expand Down Expand Up @@ -57,7 +58,8 @@ substructure_table <- function(){
c("PUTAMEN_LEFT", "Putamen-L"),
c("PUTAMEN_RIGHT", "Putamen-R"),
c("THALAMUS_LEFT", "Thalamus-L"),
c("THALAMUS_RIGHT", "Thalamus-R")
c("THALAMUS_RIGHT", "Thalamus-R"),
c("OTHER", "Other")
))
colnames(table) <- c("Original_Name", "ciftiTools_Name")
table$Index <- seq_len(nrow(table))
Expand Down
23 changes: 11 additions & 12 deletions R/make_xifti.R
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
#' \code{\link{substructure_table}}. It is either a NIFTI file path, 3D data array
#' (\eqn{i \times j \times k}) of integer brainstructure indices, or a \eqn{V_S} length
#' vector in spatial order with brainstructure names as factors or integer
#' indices. The indices should be 3-21 (1 and 2 correspond to left and right
#' indices. The indices should be 3-22 (1 and 2 correspond to left and right
#' cortex, respectively) or 1-19 (cortex labels omitted), with 0 representing
#' out-of-mask voxels.
#'
Expand All @@ -93,18 +93,17 @@
#' the medial wall from the data values. \code{NULL} should be used if \code{NA}
#' or \code{NaN} are legitimate values that non-medial wall vertices might
#' take on.
#' @param cifti_info (Optional) The result of \code{\link{info_cifti}}. If
#' GIFTI and/or NIFTI components from a CIFTI are being provided,
#' providing \code{cifti_info} gives metadata information that would otherwise
#' have to be inferred: the NIFTI intent, brainstructures present in the
#' original file, and miscellaneous metadata.
#' @param cifti_info (Optional) The result of \code{\link{info_cifti}}, i.e.
#' the metadata to put in \code{$meta$cifti}: the NIFTI intent, and
#' miscellaneous metadata. If GIFTI and/or NIFTI components from a CIFTI are
#' being provided, providing \code{cifti_info} gives information that would
#' otherwise have to be inferred.
#'
#' This argument is probably not necessary for end users: reading a CIFTI
#' should be done by providing \code{cifti_fname}, and for reading separate
#' GIFTI/NIFTI components \code{cifti_info} is not applicable.
#'
#' Column names from \code{cortexL} and \code{cortexR} take precedence over column
#' names from \code{cifti_info}.
#' Column names from \code{cortexL} and \code{cortexR} take precedence over
#' column names from \code{cifti_info}.
#'
#' \code{$meta$cifti$brainstructures} will be based on what data is provided
#' to \code{make_xifti} rather than \code{cifti_info}.
#' @param surfL,surfR (Optional) Surface geometries for the left or right cortex.
#' Can be a surface GIFTI file path or \code{"surf"} object; see
#' \code{\link{make_surf}} for a full description of valid inputs.
Expand Down
Loading

0 comments on commit 1b96cf0

Please sign in to comment.