Description Usage Arguments Value Author(s) Examples
View source: R/registerLesionToTemplate.R
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
).
1 2 3 | registerLesionToTemplate(subImg, subLesion, templateImg = NA,
templateBrainMask = NA, templateRegMask = NA, skullStrip = T,
typeofTransform = "SyNCC", outprefix = "", showInfo = T, ...)
|
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 |
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
|
showInfo |
logical whether to show info messages or be completely
quiet. If you want also verbose registration messages,
please set |
... |
other arguments to pass to |
List of objects returned:
subImg
- subject\'s image in native space (after bias correction,
denoising, skull stripping, etc.)
subLesion
- subject\'s lesion map in native space
subImgTemplate
- subject\'s image in template space
subLesionTemplate
- subject\'s lesion in template space
subRegMask
- registration mask in native space
templateImg
- the template used to register the subject
templateBrainMask
- the brain mask of the template image
subLesionTemplate
- the template mask with skull and no face
registration$inverse_subject2template
- transformation matrices subject to template
registration$forward_template2subject
- transformation matrices template to subject
Dorian Pustina
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.