Package 'ciftier'

Title: Read and Write CIFTI-2 Neuroimaging Files
Description: Pure R implementation of CIFTI-2 format I/O for grayordinate neuroimaging data. Reads and writes dense timeseries (.dtseries.nii), dense scalars (.dscalar.nii), and dense labels (.dlabel.nii) files without requiring external tools such as Connectome Workbench. Provides S4 classes mirroring the CIFTI-2 XML schema, user-friendly axis abstractions, and optional integration with 'neuroim2' and 'neurosurf' for spatially-aware brain imaging objects.
Authors: Bradley R Buchsbaum [aut, cre, cph]
Maintainer: Bradley R Buchsbaum <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2026-05-29 11:36:16 UTC
Source: https://github.com/bbuchsbaum/ciftier

Help Index


Extract Bilateral Surface Data as a neurosurf Object

Description

Extracts left and right cortex data and combines them into a neurosurf::BilatNeuroSurfaceVector.

Usage

as_bilat_surface_vector(x, left_geometry, right_geometry)

Arguments

x

A CiftiImage with loaded data.

left_geometry

A neurosurf::SurfaceGeometry for the left hemisphere.

right_geometry

A neurosurf::SurfaceGeometry for the right hemisphere.

Value

A BilatNeuroSurfaceVector.


Extract Surface Data as a neurosurf Object

Description

Extracts data for a cortical surface structure from a CiftiImage and returns it as a neurosurf object.

Usage

as_neuro_surface(x, structure, geometry)

Arguments

x

A CiftiImage with loaded data.

structure

Character string naming the surface structure (e.g., "cortex_left", "cortex_right").

geometry

A neurosurf::SurfaceGeometry object providing the mesh for this hemisphere. Required.

Details

For a single-map image, returns a neurosurf::NeuroSurface. For multi-map or time series data, returns a neurosurf::NeuroSurfaceVector.

Value

A NeuroSurface (single map) or NeuroSurfaceVector (multiple maps / time series).


Extract All Subcortical Volume Data as a neuroim2 Object

Description

Combines all volume-based brain structures into a single SparseNeuroVol or SparseNeuroVec.

Usage

as_neuro_vec(x)

Arguments

x

A CiftiImage with loaded data.

Value

A SparseNeuroVol (single map) or SparseNeuroVec (multiple maps / time series).


Extract Volume Data as a neuroim2 Object

Description

Extracts data for a subcortical (volume-based) brain structure from a CiftiImage and returns it as a neuroim2 sparse volume.

Usage

as_neuro_vol(x, structure)

Arguments

x

A CiftiImage with loaded data.

structure

Character string naming the subcortical structure (e.g., "thalamus_left", "CIFTI_STRUCTURE_PUTAMEN_RIGHT").

Details

For a single-map image (e.g., one scalar map), returns a neuroim2::SparseNeuroVol. For multi-map or time series data, returns a neuroim2::SparseNeuroVec.

Value

A SparseNeuroVol (single map) or SparseNeuroVec (multiple maps / time series).


Convert Axis Objects Back to CiftiHeader

Description

Convert Axis Objects Back to CiftiHeader

Usage

axes_to_header(row_axis, col_axis, version = "2")

Arguments

row_axis

A CiftiAxis for rows (dimension 0).

col_axis

A CiftiAxis for columns (dimension 1).

version

Character version string (default "2").

Value

A CiftiHeader object.


Create a BrainModelAxis from a Mask

Description

Create a BrainModelAxis from a Mask

Usage

brain_model_from_mask(mask, name, affine = NULL)

Arguments

mask

For surfaces: a logical vector (length = nvertex). For volumes: a 3D logical array.

name

Canonical CIFTI structure string.

affine

4x4 affine matrix (required for volume masks).

Value

A BrainModelAxis object.


Create a BrainModelAxis from Surface Vertex Indices

Description

Create a BrainModelAxis from Surface Vertex Indices

Usage

brain_model_from_surface(vertices, nvertex, name)

Arguments

vertices

Integer vector of 0-based vertex indices.

nvertex

Total number of vertices on the surface.

name

Canonical CIFTI structure string.

Value

A BrainModelAxis object.


Get Brain Models from an Object

Description

Get Brain Models from an Object

Usage

brain_models(x, ...)

Arguments

x

A CIFTI object.

...

Additional arguments.

Value

A list of CiftiBrainModel objects.


BrainModelAxis Class

Description

Describes a BRAIN_MODELS dimension — each row/col maps to a surface vertex or volume voxel.

Usage

## S4 method for signature 'BrainModelAxis'
show(object)

## S4 method for signature 'BrainModelAxis'
length(x)

## S4 method for signature 'BrainModelAxis,numeric,missing'
x[i, j, ..., drop = TRUE]

## S4 method for signature 'BrainModelAxis,logical,missing'
x[i, j, ..., drop = TRUE]

## S4 method for signature 'BrainModelAxis'
c(x, ...)

## S4 method for signature 'BrainModelAxis,BrainModelAxis'
e1 == e2

## S4 method for signature 'BrainModelAxis'
iter_structures(x, ...)

Arguments

object

A BrainModelAxis object.

x

A BrainModelAxis object.

i

Numeric or logical index vector.

j

Not used.

...

Additional arguments (ignored).

drop

Logical (ignored).

e1

First BrainModelAxis.

e2

Second BrainModelAxis.

Slots

name

Character vector of structure names (one per grayordinate).

vertex

Integer vector of 0-based vertex indices (NA for voxel entries).

voxel

Integer matrix (N x 3) of 0-based IJK indices (NA rows for surface entries).

surface_mask

Logical vector: TRUE for surface entries, FALSE for volume.

nvertices

Named list mapping structure names to total vertex counts.

affine

4x4 numeric matrix (volume affine) or NULL.

volume_shape

Integer vector of length 3 or NULL.


Build CIFTI-2 XML from Header

Description

Converts a CiftiHeader to an XML character string.

Usage

build_cifti_xml(header)

Arguments

header

A CiftiHeader object.

Value

A character string containing the CIFTI-2 XML.


Get the Data Matrix

Description

Get the Data Matrix

Usage

cifti_data(x, ...)

Arguments

x

A CIFTI object.

...

Additional arguments.

Value

A numeric matrix.


Build a CiftiImage from Spatial Data Objects

Description

Constructs a CiftiImage from neuroim2 volume objects and/or neurosurf surface objects.

Usage

cifti_from_data(
  surfaces = list(),
  volumes = list(),
  row_axis = NULL,
  intent = 3002L
)

Arguments

surfaces

A named list of neurosurf objects, where names are CIFTI structure identifiers (e.g., "cortex_left", "cortex_right"). Each element should be a NeuroSurface or NeuroSurfaceVector.

volumes

A named list of neuroim2 volume objects, where names are CIFTI structure identifiers (e.g., "thalamus_left"). Each element should be a SparseNeuroVol or SparseNeuroVec.

row_axis

A CiftiAxis for the row dimension (e.g., a SeriesAxis for time series data). If NULL, a default SeriesAxis is created.

intent

Integer NIfTI intent code (default: 3002 for dtseries).

Value

A CiftiImage.


Get the CIFTI Header

Description

Get the CIFTI Header

Usage

cifti_header(x, ...)

Arguments

x

A CIFTI object.

...

Additional arguments.

Value

A CiftiHeader object.


CIFTI-2 Index Types

Description

Identifies what kind of data a dimension contains.

Usage

CIFTI_INDEX_TYPES

Format

An object of class character of length 5.


Get the NIfTI Intent Code

Description

Get the NIfTI Intent Code

Usage

cifti_intent(x, ...)

Arguments

x

A CIFTI object.

...

Additional arguments.

Value

An integer intent code.


CIFTI-2 NIfTI Intent Codes

Description

NIfTI intent codes used by CIFTI-2 files.

Usage

CIFTI_INTENTS

Format

An object of class integer of length 11.


CIFTI-2 Brain Model Types

Description

CIFTI-2 Brain Model Types

Usage

CIFTI_MODEL_TYPES

Format

An object of class character of length 2.


CIFTI-2 Series Unit Types

Description

CIFTI-2 Series Unit Types

Usage

CIFTI_SERIES_UNITS

Format

An object of class character of length 4.


CIFTI-2 Brain Structure Names

Description

Named character vector of valid CIFTI-2 brain structure identifiers. Names are short aliases; values are the full CIFTI XML strings.

Usage

CIFTI_STRUCTURES

Format

An object of class character of length 33.


CiftiAxis Virtual Base Class

Description

All CIFTI axis types inherit from this virtual class.


CiftiBrainModel Class

Description

Describes one brain structure's mapping in a BrainModels index map. Indices stored here follow CIFTI conventions (0-based).

Slots

index_offset

Integer offset into the matrix dimension.

index_count

Integer number of indices for this model.

model_type

Character: "CIFTI_MODEL_TYPE_SURFACE" or "CIFTI_MODEL_TYPE_VOXELS".

brain_structure

Character: canonical CIFTI structure string.

surface_number_of_vertices

Integer: total vertices on the surface (0 for voxel models).

vertex_indices

Integer vector of 0-based vertex indices (surface models).

voxel_indices_ijk

Integer matrix (N x 3) of 0-based IJK voxel indices (voxel models).


CiftiHeader Class

Description

Top-level parsed CIFTI-2 XML header.

Slots

version

Character string (e.g., "2").

matrix

A CiftiMatrix object.


Create a CiftiImage

Description

Create a CiftiImage

Usage

CiftiImage(
  data = NULL,
  header = NULL,
  row_axis = NULL,
  col_axis = NULL,
  intent = 0L,
  file_name = ""
)

Arguments

data

A numeric matrix (rows x cols), or NULL.

header

A CiftiHeader object (optional if axes given).

row_axis

A CiftiAxis for rows.

col_axis

A CiftiAxis for columns.

intent

Integer NIfTI intent code.

file_name

Character source file path.

Value

A CiftiImage object.


CiftiImage Class

Description

A complete CIFTI-2 image: data matrix + header + axis descriptors.

Usage

## S4 method for signature 'CiftiImage'
show(object)

## S4 method for signature 'CiftiImage'
row_axis(x, ...)

## S4 method for signature 'CiftiImage'
col_axis(x, ...)

## S4 method for signature 'CiftiImage'
cifti_header(x, ...)

## S4 method for signature 'CiftiImage'
cifti_intent(x, ...)

## S4 method for signature 'CiftiImage'
cifti_data(x, ...)

## S4 method for signature 'CiftiImage'
dim(x)

## S4 method for signature 'CiftiImage'
brain_models(x, ...)

## S4 method for signature 'CiftiImage'
named_maps(x, ...)

## S4 method for signature 'CiftiImage'
volume_info(x, ...)

## S4 method for signature 'CiftiImage,character'
extract_structure(x, structure, ...)

## S4 method for signature 'CiftiImage,ANY,ANY'
x[i, j, ..., drop = FALSE]

Arguments

object

A CiftiImage object.

x

A CiftiImage object.

...

Additional arguments (ignored).

structure

Character string naming a brain structure (optional filter).

i

Row indices.

j

Column indices.

drop

Logical (ignored).

Slots

data

A numeric matrix (or NULL for header-only reads).

header

A CiftiHeader object.

row_axis

A CiftiAxis describing rows.

col_axis

A CiftiAxis describing columns.

intent

Integer NIfTI intent code.

file_name

Character source file path (may be empty).


CiftiLabel Class

Description

A single label entry in a CIFTI label table.

Slots

key

Integer key value.

label

Character label string.

red

Numeric red channel (0-1).

green

Numeric green channel (0-1).

blue

Numeric blue channel (0-1).

alpha

Numeric alpha channel (0-1).


CiftiLabelTable Class

Description

A table of label entries for a named map.

Slots

labels

A list of CiftiLabel objects.


CiftiMatrix Class

Description

Complete matrix metadata — contains all dimension descriptors.

Slots

maps

A list of CiftiMatrixIndicesMap objects.

metadata

A named list of metadata key-value pairs.


CiftiMatrixIndicesMap Class

Description

Describes one dimension of the CIFTI data matrix.

Slots

applies_to_dimension

Integer vector (0-based dimension indices this map applies to).

index_type

Character: one of the CIFTI_INDEX_TYPES values.

brain_models

List of CiftiBrainModel objects.

named_maps

List of CiftiNamedMap objects.

parcels

List of CiftiParcel objects.

surfaces

List of CiftiSurface objects.

volume

A CiftiVolume or NULL.

series_start

Numeric start value for SERIES type.

series_step

Numeric step value for SERIES type.

series_unit

Character unit for SERIES type.

number_of_series_points

Integer count for SERIES type.


CiftiNamedMap Class

Description

One named map entry (used in SCALARS and LABELS index types).

Slots

map_name

Character string naming the map.

label_table

A CiftiLabelTable or NULL.

metadata

A named list of metadata key-value pairs.


CiftiParcel Class

Description

One parcel in a PARCELS index map.

Slots

name

Character parcel name.

surface_vertices

A named list mapping structure names to integer vectors of 0-based vertex indices.

voxel_indices_ijk

Integer matrix (N x 3) of 0-based IJK voxel indices.


CiftiSurface Class

Description

Surface metadata for a PARCELS index map.

Slots

brain_structure

Character: canonical CIFTI structure string.

number_of_vertices

Integer: total vertices on the surface.


CiftiVolume Class

Description

Volume geometry reference (dimensions and affine transform).

Slots

dimensions

Integer vector of length 3 (I, J, K).

transform

A 4x4 numeric matrix (voxel-to-world affine).


Get the Column Axis of a CIFTI Object

Description

Get the Column Axis of a CIFTI Object

Usage

col_axis(x, ...)

Arguments

x

A CIFTI object.

...

Additional arguments.

Value

A CiftiAxis object.


Create a Dense Connectivity CIFTI Image

Description

Connectivity matrix between grayordinates (BrainModelAxis x BrainModelAxis).

Usage

dconn(data, row_brain_model, col_brain_model = row_brain_model)

Arguments

data

Numeric matrix (grayordinates x grayordinates).

row_brain_model

A BrainModelAxis for rows.

col_brain_model

A BrainModelAxis for columns (defaults to row_brain_model).

Value

A CiftiImage with intent 3001.


Create a Dense Label CIFTI Image

Description

Create a Dense Label CIFTI Image

Usage

dlabel(data, brain_model, names = NULL, label_tables = NULL)

Arguments

data

Integer matrix (maps x grayordinates) of label keys.

brain_model

A BrainModelAxis for columns.

names

Character vector of map names.

label_tables

List of CiftiLabelTable objects.

Value

A CiftiImage with intent 3007.


Create a Dense-to-Parcel Connectivity CIFTI Image

Description

Connectivity from grayordinates (rows) to parcels (columns).

Usage

dpconn(data, brain_model, parcels)

Arguments

data

Numeric matrix (grayordinates x parcels).

brain_model

A BrainModelAxis for rows.

parcels

A ParcelsAxis for columns.

Value

A CiftiImage with intent 3010.


Create a Dense Scalar CIFTI Image

Description

Create a Dense Scalar CIFTI Image

Usage

dscalar(data, brain_model, names = NULL)

Arguments

data

Numeric matrix (maps x grayordinates).

brain_model

A BrainModelAxis for columns.

names

Character vector of map names.

Value

A CiftiImage with intent 3006.


Create a Dense Timeseries CIFTI Image

Description

Create a Dense Timeseries CIFTI Image

Usage

dtseries(data, brain_model, start = 0, step = 1, unit = "SECOND")

Arguments

data

Numeric matrix (time x grayordinates).

brain_model

A BrainModelAxis for columns.

start

Numeric start time (default 0).

step

Numeric TR / time step.

unit

Character unit (default "SECOND").

Value

A CiftiImage with intent 3002.


Extract Data for a Single Brain Structure

Description

Returns the sub-matrix corresponding to a specific brain structure from a CiftiImage.

Usage

extract_structure(x, structure, ...)

Arguments

x

A CiftiImage object.

structure

Character string naming the structure (e.g., "cortex_left").

...

Additional arguments.

Value

A list with elements data (matrix), axis (subsetted axis), and indices (column indices into the original data).


Convert CiftiHeader to Axis Objects

Description

Convert CiftiHeader to Axis Objects

Usage

header_to_axes(header)

Arguments

header

A CiftiHeader object.

Value

A list with elements row_axis and col_axis.


Iterate Over Brain Structures

Description

Returns a list of (structure_name, slice) pairs for each brain structure in an axis.

Usage

iter_structures(x, ...)

Arguments

x

An axis object.

...

Additional arguments.

Value

A named list of index ranges.


LabelAxis Class

Description

Describes a LABELS dimension — each entry is a named label map with an associated label table.

Usage

## S4 method for signature 'LabelAxis'
show(object)

## S4 method for signature 'LabelAxis'
length(x)

## S4 method for signature 'LabelAxis,numeric,missing'
x[i, j, ..., drop = TRUE]

Arguments

object

A LabelAxis object.

x

A LabelAxis object.

i

Numeric index vector.

j

Not used.

...

Additional arguments (ignored).

drop

Logical (ignored).

Slots

name

Character vector of map names.

label

List of CiftiLabelTable objects (one per map).

meta

List of named lists (metadata per map).


Get Named Maps from an Object

Description

Get Named Maps from an Object

Usage

named_maps(x, ...)

Arguments

x

A CIFTI object.

...

Additional arguments.

Value

A list of CiftiNamedMap objects.


Create a ParcelsAxis from Brain Models

Description

Create a ParcelsAxis from Brain Models

Usage

parcels_from_brain_models(named_brain_models)

Arguments

named_brain_models

A named list where each element is a BrainModelAxis and names are parcel names.

Value

A ParcelsAxis object.


ParcelsAxis Class

Description

Describes a PARCELS dimension — each row/col maps to a named parcel.

Usage

## S4 method for signature 'ParcelsAxis'
show(object)

## S4 method for signature 'ParcelsAxis'
length(x)

## S4 method for signature 'ParcelsAxis,numeric,missing'
x[i, j, ..., drop = TRUE]

## S4 method for signature 'ParcelsAxis'
iter_structures(x, ...)

Arguments

object

A ParcelsAxis object.

x

A ParcelsAxis object.

i

Numeric index vector.

j

Not used.

...

Additional arguments (ignored).

drop

Logical (ignored).

Slots

parcel_name

Character vector of parcel names.

voxels

List of integer matrices (N x 3) of 0-based IJK indices per parcel.

vertices

List of named lists mapping structure names to integer vectors per parcel.

nvertices

Named list mapping structure names to total vertex counts.

affine

4x4 numeric matrix or NULL.

volume_shape

Integer vector of length 3 or NULL.


Parse CIFTI-2 XML Header

Description

Parses raw XML bytes (or a character string) from a CIFTI-2 NIfTI extension into a CiftiHeader object.

Usage

parse_cifti_xml(xml_data)

Arguments

xml_data

Raw vector, character string, or xml2 document.

Value

A CiftiHeader object.


Create a Parcel Connectivity CIFTI Image

Description

Connectivity matrix between parcels (ParcelsAxis x ParcelsAxis).

Usage

pconn(data, row_parcels, col_parcels = row_parcels)

Arguments

data

Numeric matrix (parcels x parcels).

row_parcels

A ParcelsAxis for rows.

col_parcels

A ParcelsAxis for columns (defaults to row_parcels).

Value

A CiftiImage with intent 3003.


Create a Parcel Series CIFTI Image

Description

Parcel data with a series axis on rows (e.g., parcellated time series with parcels on both axes is ConnParcelSeries, intent 3009).

Usage

pcseries(data, parcels, start = 0, step = 1, unit = "SECOND")

Arguments

data

Numeric matrix (series x parcels).

parcels

A ParcelsAxis for columns.

start

Numeric start value (default 0).

step

Numeric step value.

unit

Character unit (default "SECOND").

Value

A CiftiImage with intent 3009.


Create a Parcel-to-Dense Connectivity CIFTI Image

Description

Connectivity from parcels (rows) to grayordinates (columns).

Usage

pdconn(data, parcels, brain_model)

Arguments

data

Numeric matrix (parcels x grayordinates).

parcels

A ParcelsAxis for rows.

brain_model

A BrainModelAxis for columns.

Value

A CiftiImage with intent 3011.


Create a Parcel Label CIFTI Image

Description

Create a Parcel Label CIFTI Image

Usage

plabel(data, parcels, names = NULL, label_tables = NULL)

Arguments

data

Integer matrix (maps x parcels) of label keys.

parcels

A ParcelsAxis for columns.

names

Character vector of map names.

label_tables

List of CiftiLabelTable objects.

Value

A CiftiImage with intent 3012.


Create a Parcel Scalar CIFTI Image

Description

Create a Parcel Scalar CIFTI Image

Usage

pscalar(data, parcels, names = NULL)

Arguments

data

Numeric matrix (maps x parcels).

parcels

A ParcelsAxis for columns.

names

Character vector of map names.

Value

A CiftiImage with intent 3008.


Create a Parcel Timeseries CIFTI Image

Description

Create a Parcel Timeseries CIFTI Image

Usage

ptseries(data, parcels, start = 0, step = 1, unit = "SECOND")

Arguments

data

Numeric matrix (time x parcels).

parcels

A ParcelsAxis for columns.

start

Numeric start time (default 0).

step

Numeric TR / time step.

unit

Character unit (default "SECOND").

Value

A CiftiImage with intent 3004.


Read a CIFTI-2 File

Description

Reads a CIFTI-2 file (.dtseries.nii, .dscalar.nii, .dlabel.nii, etc.) and returns a CiftiImage.

Usage

read_cifti(file_name, drop_data = FALSE)

Arguments

file_name

Path to the CIFTI-2 file.

drop_data

If TRUE, only read the header/axes without loading the data matrix. Useful for inspecting large files.

Details

The function reads the NIfTI-2 header using RNifti, extracts the CIFTI-2 XML extension (ecode=32), parses it into axis objects, and optionally reads the binary data matrix.

Value

A CiftiImage object.


Get the Row Axis of a CIFTI Object

Description

Get the Row Axis of a CIFTI Object

Usage

row_axis(x, ...)

Arguments

x

A CIFTI object.

...

Additional arguments.

Value

A CiftiAxis object.


ScalarAxis Class

Description

Describes a SCALARS dimension — each entry is a named scalar map.

Usage

## S4 method for signature 'ScalarAxis'
show(object)

## S4 method for signature 'ScalarAxis'
length(x)

## S4 method for signature 'ScalarAxis,numeric,missing'
x[i, j, ..., drop = TRUE]

## S4 method for signature 'ScalarAxis'
c(x, ...)

## S4 method for signature 'ScalarAxis,ScalarAxis'
e1 == e2

Arguments

object

A ScalarAxis object.

x

A ScalarAxis object.

i

Numeric index vector.

j

Not used.

...

Additional arguments (ignored).

drop

Logical (ignored).

e1

First ScalarAxis.

e2

Second ScalarAxis.

Slots

name

Character vector of map names.

meta

List of named lists (metadata per map).


SeriesAxis Class

Description

Describes a SERIES dimension (e.g., time points).

Usage

## S4 method for signature 'SeriesAxis'
show(object)

## S4 method for signature 'SeriesAxis'
length(x)

## S4 method for signature 'SeriesAxis,numeric,missing'
x[i, j, ..., drop = TRUE]

## S4 method for signature 'SeriesAxis'
c(x, ...)

## S4 method for signature 'SeriesAxis,SeriesAxis'
e1 == e2

Arguments

object

A SeriesAxis object.

x

A SeriesAxis object.

i

Numeric index vector.

j

Not used.

...

Additional arguments (ignored).

drop

Logical (ignored).

e1

First SeriesAxis.

e2

Second SeriesAxis.

Slots

start

Numeric start value.

step

Numeric step size.

size

Integer number of points.

unit

Character unit string (one of CIFTI_SERIES_UNITS).


Convert 1-based R Index to 0-based CIFTI Index

Description

Convert 1-based R Index to 0-based CIFTI Index

Usage

to_cifti_index(x)

Arguments

x

An integer vector of 1-based indices.

Value

An integer vector of 0-based indices.


Normalize a Brain Structure Name to CIFTI Convention

Description

Converts short names, common aliases, and partial matches to the canonical CIFTI_STRUCTURE_* string.

Usage

to_cifti_structure_name(name)

Arguments

name

A character string (e.g., "cortex_left", "CORTEX_LEFT", "CortexLeft", "CIFTI_STRUCTURE_CORTEX_LEFT").

Value

The canonical CIFTI structure string.

Examples

to_cifti_structure_name("cortex_left")
to_cifti_structure_name("CORTEX_LEFT")
to_cifti_structure_name("CortexLeft")

Convert 0-based CIFTI Index to 1-based R Index

Description

Convert 0-based CIFTI Index to 1-based R Index

Usage

to_r_index(x)

Arguments

x

An integer vector of 0-based indices.

Value

An integer vector of 1-based indices.


Get Volume Information

Description

Get Volume Information

Usage

volume_info(x, ...)

Arguments

x

A CIFTI object.

...

Additional arguments.

Value

A CiftiVolume object or NULL.


Write a CIFTI-2 File

Description

Writes a CiftiImage to a CIFTI-2 NIfTI file.

Usage

write_cifti(x, file_name, data_type = "FLOAT32")

Arguments

x

A CiftiImage object.

file_name

Output file path.

data_type

Data type for the binary data. One of "FLOAT32" (default) or "FLOAT64".

Value

Invisibly returns the file path.