[242173]: / man / CT_Skull_Strip_robust.Rd

Download this file

165 lines (140 with data), 4.5 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/CT_Skull_Strip_robust.R
\name{CT_Skull_Strip_robust}
\alias{CT_Skull_Strip_robust}
\alias{CT_Skull_Strip_register}
\alias{CT_Skull_Strip_smooth}
\title{Robust CT Skull Stripping}
\usage{
CT_Skull_Strip_robust(
img,
outfile = NULL,
keepmask = TRUE,
maskfile = NULL,
retimg = TRUE,
reorient = FALSE,
int = "0.01",
lthresh = 0,
uthresh = 100,
nvoxels = 5,
remove.neck = TRUE,
remover = c("remove_neck", "double_remove_neck"),
smooth.factor = 2,
recog = TRUE,
verbose = TRUE,
opts = NULL,
mask_to_background = FALSE,
template.file = system.file("scct_unsmooth_SS_0.01.nii.gz", package = "ichseg"),
template.mask = system.file("scct_unsmooth_SS_0.01_Mask.nii.gz", package = "ichseg"),
...
)
CT_Skull_Strip_register(
img,
outfile = NULL,
keepmask = TRUE,
maskfile = NULL,
retimg = TRUE,
reorient = FALSE,
lthresh = 0,
uthresh = 100,
remove.neck = TRUE,
remover = c("remove_neck", "double_remove_neck"),
verbose = TRUE,
mask_to_background = FALSE,
...
)
CT_Skull_Strip_smooth(
img,
...,
smooth_before_threshold = TRUE,
smooth.factor = 1,
remove.neck = TRUE,
remover = c("remove_neck", "double_remove_neck"),
recog = FALSE,
nvoxels = 0,
add_1024 = FALSE
)
}
\arguments{
\item{img}{(character) File to be skull stripped or object of class
nifti}
\item{outfile}{(character) output filename}
\item{keepmask}{(logical) Should we keep the mask?}
\item{maskfile}{(character) Filename for mask
(if \code{keepmask = TRUE}).
If \code{NULL}, then will do \code{paste0(outfile, "_Mask")}.}
\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{int}{Fractional Intensity passed to
\code{\link{CT_Skull_Strip}} and
subsequently \code{\link{fslbet}}.}
\item{lthresh}{(default: 0) Lower value to threshold CT
\code{\link{fslthresh}}}
\item{uthresh}{(default: 100) Upper value to threshold CT
\code{\link{fslthresh}}}
\item{nvoxels}{Number of voxels to dilate/erode.
See \code{\link{dil_ero}}.
If \code{nvoxels = 0}, then no smoothing is done.}
\item{remove.neck}{Run \code{\link{remove_neck}} to register
the template to a
thresholded image to remove neck slices.}
\item{remover}{if \code{remove.neck = TRUE}, then which function
would you like to use to remove the neck}
\item{smooth.factor}{Smoothing factor for \code{\link{fslbet}}.
See \code{-w}
option in \code{fslbet.help()}.}
\item{recog}{Re-estimate the center of gravity (COG) and
skull strip.}
\item{verbose}{(logical) Should diagnostic output be printed?}
\item{opts}{Not used}
\item{mask_to_background}{When masking, should the values outside the
mask be set to 0 (default) or -1024 (when TRUE)}
\item{template.file}{Template to warp to original image
space, passed to
\code{\link{remove_neck}}}
\item{template.mask}{Mask of template to use as rough
brain mask, passed
to \code{\link{remove_neck}}}
\item{...}{additional arguments passed to
\code{\link{CT_Skull_Strip}} or
\code{\link{remove_neck}}.}
\item{smooth_before_threshold}{Should the image be smoothed before
thresholding? This can be useful for bone-window scans.}
\item{add_1024}{Adding 1024 to the image *before* running the skull
stripping. The values are subtracted after. This has interplay with
\code{mask_to_background}}
}
\value{
Skull-stripped \code{nifti} object
}
\description{
Skull Stripping (using FSL's BET) a CT file
using \code{fslr}
functions and robustified by registration
}
\note{
This function first thresholds an image, runs a rigid
registration
(default in \code{\link{remove_neck}}) to drop any slices
below the transformed
skull stripped template to remove neck slices. The neck-removed
image is
then skull stripped using defaults in \code{\link{CT_Skull_Strip}}.
A new
center of gravity is estiamted using \code{\link{cog}}, then the
image is
skull stripped again using the new cog and the smoothness factor
(passed to \code{-w} argument in BET). After the skull stripped
mask is
created, the image is dilated and eroded using
\code{\link{dil_ero}} to
fill holes using a box kernel with the number of voxels
\code{nvoxels} in
all 3 directions.
\code{CT_Skull_Strip_register} removes the neck, registers the
image to the template, using a rigid-body transformation,
runs the skull stripper to get a mask, then transforms the mask
back to native space.
}