% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vis_volume.R
\name{draw.segments.on.image}
\alias{draw.segments.on.image}
\title{Draw contour segments onto a magick image.}
\usage{
draw.segments.on.image(
  img,
  segments,
  slice_axis,
  row_axis,
  col_axis,
  color = "#FF0000",
  lwd = 1
)
}
\arguments{
\item{img}{a magick image instance (a single 2D slice image).}

\item{segments}{list of 2×2 matrices, each a line segment in 0-based CRS coordinates on the two orthogonal axes.}

\item{slice_axis}{integer, the axis (1,2,3) perpendicular to the slice plane.}

\item{row_axis}{integer, which CRS axis (1, 2, or 3) maps to the image row dimension.}

\item{col_axis}{integer, which CRS axis (1, 2, or 3) maps to the image column dimension.}

\item{color}{character string, the color for the contour lines.}

\item{lwd}{numeric, line width passed to \code{\link[graphics]{segments}}. Defaults to 1.}
}
\value{
the modified magick image (invisibly).
}
\description{
Draws a set of line segments (as returned by \code{\link[fsbrain]{mesh.slice.intersection}}) onto a magick image. Individual mesh triangles produce small segments, which collectively trace the contour boundary when drawn together.
}
\keyword{internal}
