ear_mask: Create Mask of the Ears

Description Usage Arguments Value Examples

Description

Creates a rough mask of the ear from a head scan

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
ct_ear_mask(
  file,
  skull_strip = TRUE,
  mask = NULL,
  robust = TRUE,
  template.file = system.file("scct_unsmooth_SS_0.01.nii.gz", package = "ichseg"),
  template.ear_mask = NULL,
  template.left_ear_inds = list(170:180, 60:110, 1:60),
  template.right_ear_inds = list(1:10, 60:110, 1:60),
  extend_left = TRUE,
  extend_right = TRUE,
  typeofTransform = "Affine",
  swapdim = TRUE,
  verbose = TRUE,
  ...
)

mri_ear_mask(
  ...,
  skull_strip = TRUE,
  mask = NULL,
  robust = FALSE,
  template.file = mni_fname(brain = skull_strip)
)

Arguments

file

File for face masking - either filename or class nifti

skull_strip

Should the data require skull stripping if no mask is provided?

mask

file or nifti to mask the file

robust

If mask = NULL, then robust is passed to CT_Skull_Stripper

template.file

Template to warp to original image space

template.ear_mask

Mask of template to use as rough ear mask. If template.file is not specified, template.left_ear_inds and template.right_ear_inds must be

template.left_ear_inds

List of length 3 for indices of template.file to indicate the left-ear mask.

template.right_ear_inds

List of length 3 for indices of template.file to indicate the right-ear mask.

extend_left

after transformation, should the mask be extended to the left of the image to ensure all left ear has been removed?

extend_right

after transformation, should the mask be extended to the right of the image to ensure all right ear has been removed?

typeofTransform

Transformation for template to image, passed to ants_regwrite.

swapdim

Should the dimensions be swapped before registration, and then reset after

verbose

Print out diagnostic messages

...

arguments passed to CT_Skull_Stripper

Value

Object of class nifti

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
file = "~/Desktop/Desktop/scratch/100-318_20070723_0957_CT_3_CT_Head-.nii.gz"
mask = NULL
robust = FALSE
ears = ct_ear_mask(
   file = file,
   robust = FALSE
 )
 img = readnii(file)
 rimg = randomize_mask(img, mask = ears)

## End(Not run)

neuroconductor/ichseg documentation built on Sept. 29, 2020, 2:31 p.m.