Processes multiple PET image files matching a specified filename pattern.
Each file is processed using neuroCleaner, and the results are aggregated
into a unified data frame for functional data analysis. This function serves as a key step
in the neuroSCC workflow, bridging raw image data and Simultaneous Confidence Corridors (SCC) computation.
Usage
databaseCreator(
pattern,
control = TRUE,
useSequentialNumbering = FALSE,
demo = NULL,
quiet = FALSE
)Arguments
- pattern
character. A regular expression defining the file pattern to match. Subject identifiers are extracted from filenames based on this pattern.- control
logical. IfTRUE, files are treated as control group data; ifFALSE, as pathological group data. Default isTRUE.- useSequentialNumbering
logical. IfTRUE, assigns sequential subject numbers instead of extracting them from filenames. Default isFALSE.- demo
data.frame, optional. If provided, demographic information is included for each file. Default isNULL.- quiet
logical. IfTRUE, suppresses progress messages. Default isFALSE.
Value
A data.frame combining processed voxel-level data from all matched files.
Each row represents a voxel (3D pixel). The column structure depends on input
For the control group:
CN_number,z,x,y,petFor the pathological group:
AD_number,z,x,y,petIf demographics are included: additional columns
PPT,Group,Sex,Age
Details
The function performs the following steps
Identifies image files matching the given pattern.
Processes each file using
neuroCleaner, optionally merging demographic data.Adds a subject identifier column (
CN_numberorAD_number).Aggregates all results into a single data frame.
If no files are successfully processed, an empty data frame is returned with a warning.
This function is typically followed by matrixCreator, which converts the output
into a matrix format for functional analysis.
See also
neuroCleaner for the underlying image processing function. matrixCreator for the next step in the workflow that converts
the database to a matrix format for SCC analysis.
Examples
# NOTE: To keep runtime below CRAN limits, this example processes only 1 subject.
# You can expand the pattern to include all subjects for real use.
# Example: Create a database from a single synthetic PET image (control group)
controlPattern <- "^syntheticControl1\\.nii\\.gz$"
databaseControls <- databaseCreator(pattern = controlPattern, control = TRUE, quiet = TRUE)
head(databaseControls)
#> CN_number z x y pet
#> 1 1 1 1 1 0
#> 2 1 1 1 2 0
#> 3 1 1 1 3 0
#> 4 1 1 1 4 0
#> 5 1 1 1 5 0
#> 6 1 1 1 6 0
