% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotValidationPanel.R
\name{plotValidationPanel}
\alias{plotValidationPanel}
\title{Plot ROI, SCC detections, and SPM detections for validation}
\usage{
plotValidationPanel(
  template,
  backgroundMatrix,
  roiPoints,
  sccPoints,
  spmPoints,
  title = "COMPARISON PANEL",
  label1 = "True ROI",
  label2 = "SCC Detected",
  label3 = "SPM Detected"
)
}
\arguments{
\item{template}{\code{character}, path to a NIfTI file used to obtain the
grid dimensions of the imaging domain.}

\item{backgroundMatrix}{A numeric matrix used to generate the grayscale
background image.}

\item{roiPoints}{A \code{data.frame} with columns \code{x} and \code{y}
containing the ground-truth ROI points.}

\item{sccPoints}{A list containing \code{positivePoints} and
\code{negativePoints}, each as a \code{data.frame} with columns
\code{x} and \code{y}.}

\item{spmPoints}{A \code{data.frame} with columns \code{x} and \code{y}
containing the SPM-detected points.}

\item{title}{\code{character}, title shown above the panel.}

\item{label1}{\code{character}, title of the ground-truth ROI panel.}

\item{label2}{\code{character}, title of the SCC-detected panel.}

\item{label3}{\code{character}, title of the SPM-detected panel.}
}
\value{
A patchwork/ggplot object containing three aligned panels:
\itemize{
  \item ground-truth ROI,
  \item SCC-detected points,
  \item SPM-detected points.
}
}
\description{
This function visualizes the ground-truth ROI, SCC-detected points,
and SPM-detected points as a three-panel comparison over a shared
neuroimaging background.
}
\details{
The three panels share the same grayscale background to facilitate visual
comparison between the true ROI and the points detected by SCC and SPM.

In the examples, SCC detections are restricted to positive points only
to keep the visualization simple. With real analysis outputs,
\code{sccPoints} would typically be supplied directly as
\code{getPoints(<SCC object>)}.
}
\examples{
\donttest{
paramZ <- 35

controlPattern <- "^syntheticControl.*\\\\.nii\\\\.gz$"
databaseCN <- databaseCreator(pattern = controlPattern, control = TRUE, quiet = TRUE)
matrixCN <- matrixCreator(database = databaseCN, paramZ = paramZ, quiet = TRUE)
matrixCN <- meanNormalization(matrixCN)

roiFile <- system.file("extdata", "ROIsample_Region2_18.nii.gz", package = "neuroSCC")
truePoints <- processROIs(roiFile, region = "Region2", number = "18", save = FALSE)
roiPoints <- subset(truePoints, z == paramZ & pet == 1, select = c("x", "y"))

spmFile <- system.file("extdata", "binary.nii.gz", package = "neuroSCC")
spmPoints <- getSPMbinary(spmFile, paramZ = paramZ)

data("SCCcomp", package = "neuroSCC")

plotValidationPanel(
  template = roiFile,
  backgroundMatrix = matrixCN,
  roiPoints = roiPoints,
  sccPoints = list(
    positivePoints = getPoints(SCCcomp)$positivePoints,
    negativePoints = data.frame(x = numeric(0), y = numeric(0))
  ),
  spmPoints = spmPoints,
  title = "Performance Validation Panel",
  label1 = "Ground Truth (ROI)",
  label2 = "SCC Detected",
  label3 = "SPM Detected"
)
}

}
\seealso{
\code{\link{SCCcomp}} for the example SCC object used in the examples. \cr
\code{\link{getPoints}} for extraction of SCC-detected significant points. \cr
\code{\link{getSPMbinary}} for extraction of SPM-detected significant points. \cr
\code{\link{processROIs}} for extraction of ground-truth ROI points.
}
