Skip to contents

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.

Value

A data frame with the following columns:

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

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.

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)
#>         x  y
#> 338496 12 51
#> 338497 12 52
#> 338498 12 53
#> 338499 12 54
#> 338500 12 55
#> 338501 12 56