registerLesionToTemplate: Register lesions in template space

Description Usage Arguments Value Author(s) Examples

View source: R/registerLesionToTemplate.R

Description

Brings lesion maps in template space by registering the subject\'s anatomical to the template and applying the same transform to the lesion. To improve the registration the anatomical image is bias corrected and denoised. In addition, you can choose to skull-strip the image and run a more careful registration brain-on-brain so that the skull does not impact the registration in any way. Note, for technical reasons the registration is performed counterintuitively by moving the template on the subject, and not the subject on the template. For this reason, to bring the subject in template space we use the inverse transformation. Also note, at the moment ANTsR does not produce an inverse affine transformation explicitly, both forward and inverse affine transforms are identical. You can use ANTs to compute the inverse, or tell ANTsR if you need to invert an affine matrix applying the transformations (see whichtoinvert in antsApplyTransforms).

Usage

1
2
3
registerLesionToTemplate(subImg, subLesion, templateImg = NA,
  templateBrainMask = NA, templateRegMask = NA, skullStrip = T,
  typeofTransform = "SyNCC", outprefix = "", showInfo = T, ...)

Arguments

subImg

antsImage or character filename of the anatomical image of the subject. Typically this is a T1-weighted MRI image, on which you drew the lesion map.

subLesion

antsImage or character filename of the lesion map. Typically you draw this manually or obtain it from automated lesion segmentation software. You can try our LINDA toolbox for an automated alternative. Yet, manual drawing can be performed quickly and is preferred.

templateImg

antsImage or filename of the anatomical template image. This image should be with skull included.

templateBrainMask

antsImage or filename of the template brain mask. This mask is needed for skull-stripped registrations.

templateRegMask

antsImage or filename of the template mask that includes the skull but no face. Useful for improving the skull stripping process.

skullStrip

logical whether to remove the skull and perform brain-on-brain registration.

typeofTransform

an antsRegistration parameter that controls the quality of registration. The default is SyNCC, which probably is the most robust and takes long (1-2 hours maybe). For faster registration you can try SyN.

outprefix

character of the prefix where to save the output. If this is set, most of images and transformations will be saved at the specified path/prefix. The folder must exist or you will get an error. It is passed without modification to antsRegistration.

showInfo

logical whether to show info messages or be completely quiet. If you want also verbose registration messages, please set verbose=TRUE.

...

other arguments to pass to antsRegistration

Value

List of objects returned:

Author(s)

Dorian Pustina

Examples

1
2
3
4
5
6
7
## Not run: 
anatomical = '/mnt/c/User/dp/Desktop/Subject1_anat.nii.gz'
lesion = '/mnt/c/User/dp/Desktop/Subject1_les.nii.gz'
newles = registerLesionToTemplate(anatomical, lesion,
        outprefix = '/mnt/c/User/dp/Desktop/Subj1onTemplate_')

## End(Not run)

neuroconductor/LESYMAP documentation built on May 28, 2020, 7:27 p.m.