Creates a rough mask of the ear from a head scan
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) )
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 |
robust | If |
template.file | Template to warp to original image space |
template.ear_mask | Mask of template to use as rough ear mask. If
|
template.left_ear_inds | List of length 3 for indices of
|
template.right_ear_inds | List of length 3 for indices of
|
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
|
swapdim | Should the dimensions be swapped before registration, and then reset after |
verbose | Print out diagnostic messages |
... | arguments passed to |
Object of class nifti
if (FALSE) { 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) }