neuroCleaner {neuroSCC} | R Documentation |
Clean and Load Data from NIfTI Neuroimaging Files
Description
Loads a NIfTI-format neuroimaging file and transforms it into a structured data frame,
organizing voxel-level information for downstream analysis. This function is the first step
in the neuroimaging processing pipeline in neuroSCC
, converting raw PET data into
a format suitable for functional data analysis. SCCs are later computed using functions
from the ImageSCC
package, such as ImageSCC::scc.image()
.
Usage
neuroCleaner(name, demo = NULL, demoRow = 1)
Arguments
name |
|
demo |
Optional |
demoRow |
|
Details
The function performs the following steps
Loads the NIfTI file using
oro.nifti::readNIfTI()
.Converts the 3D image into a tidy data frame.
Adds
z
,x
, andy
voxel coordinates.If demographic data is provided, attempts to match based on
PPT
(case-insensitive). If no match is found,demoRow
is used.
The resulting data frame serves as input for databaseCreator
, matrixCreator
,
and other core functions in the neuroSCC
pipeline.
Value
A data frame where each row represents a voxel (3D pixel).
If demographics are provided: the columns include
PPT
,Group
,Sex
,Age
,z
,x
,y
, andpet
.If demographics are not provided: the columns include
z
,x
,y
, andpet
.
The pet
column contains the PET intensity value at each voxel location.
See Also
databaseCreator
for batch image processing.
readNIfTI
for reading NIfTI-format files.
Examples
# Load a sample Control NIfTI file
niftiFile <- system.file("extdata", "syntheticControl1.nii.gz", package = "neuroSCC")
# Example Without demographic data
petData <- neuroCleaner(niftiFile)
petData[sample(nrow(petData), 10), ] # Show 10 random voxels