% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dil_ero.R
\name{dil_ero}
\alias{dil_ero}
\title{Fill image holes with dilation then erosion}
\usage{
dil_ero(
file,
outfile = NULL,
nvoxels = 3,
zeropad = TRUE,
remove.ends = FALSE,
tol = .Machine$double.eps^0.5,
refill = TRUE,
retimg = FALSE,
reorient = FALSE,
intern = TRUE,
verbose = TRUE,
...
)
}
\arguments{
\item{file}{(character) filename of image to be filled}
\item{outfile}{(character) name of resultant filled file}
\item{nvoxels}{(integer) Number of voxels to smooth over, creates vxvxv box.}
\item{zeropad}{(logical) Perform \code{zero_pad} before running.}
\item{remove.ends}{(logical) Remove top and bottom dilation.}
\item{tol}{(double) Tolerance for thresholding after \code{\link{fft}}.}
\item{refill}{(logical) Run \code{\link{fslfill}} after dilation/erosion.}
\item{retimg}{(logical) return image of class nifti}
\item{reorient}{(logical) If retimg, should file be reoriented when read in?
Passed to \code{\link{readNIfTI}}.}
\item{intern}{(logical) pass to \code{\link{system}}}
\item{verbose}{(logical) print out command before running}
\item{...}{additional arguments passed to \code{\link{readNIfTI}}.}
}
\value{
character or logical depending on intern
}
\description{
This function calls \code{mean_image} to dilate an image, then calls
it again to erode it.
}
\note{
This function binarizes the image before running.
}