getSPMbinary: Extract SPM-Detected Significant Points from a Binary NIfTI...

View source: R/getSPMbinary.R

getSPMbinaryR Documentation

Extract SPM-Detected Significant Points from a Binary NIfTI File

Description

Extracts voxel coordinates where pet = 1 (i.e., statistically significant points) from a binary NIfTI file produced by an external SPM analysis. Only voxels from a specific brain slice (z = paramZ) are retained.

The output data frame is structured identically to that of getPoints, allowing direct comparison between SCC- and SPM-detected regions via calculateMetrics.

Usage

getSPMbinary(niftiFile, paramZ = 35)

Arguments

niftiFile

character. The path to the binary NIfTI file generated by SPM.

paramZ

integer. The specific z-slice to extract. Default is 35.

Details

This function converts externally generated SPM results into a format compatible with SCC analysis tools in neuroSCC. Use getDimensions to inspect the full coordinate space if needed.

Value

A data frame with the following columns:

  • x, y – Coordinates of significant voxels at the specified slice.

See Also

getPoints for SCC-based detection.
getDimensions for obtaining full coordinate grids.
calculateMetrics for evaluating SCC vs. SPM detection performance.

Examples

# Load a sample binary NIfTI file (SPM result)
niftiFile <- system.file("extdata", "binary.nii.gz", package = "neuroSCC")
detectedSPM <- getSPMbinary(niftiFile, paramZ = 35)

# Show detected points
head(detectedSPM)


neuroSCC documentation built on April 4, 2025, 3:50 a.m.