Learn R Programming

ANTsR (version 0.3.3)

jointIntensityFusion: joint intensity fusion

Description

Estimates an image from another set of images - intensity generalization of joint label fusion. Search radius used only when employing labels - WIP to speed it up.

Usage

jointIntensityFusion(targetI, targetIMask, atlasList, beta = 4, rad = NA, doscale = TRUE, doNormalize = TRUE, maxAtlasAtVoxel = c(1, Inf), rho = 0.01, usecor = FALSE, boundary.condition = "image", rSearch = 2, jifImage = NA, imputeList = NA, imputedImage = NA)

Arguments

targetI
antsImage to be approximated
targetIMask
mask with value 1
atlasList
list containing antsImages
beta
weight sharpness, default to 2
rad
neighborhood radius, default to 3
doscale
scale neighborhood intensities
doNormalize
normalize each image range to 0, 1
maxAtlasAtVoxel
min/max n atlases to use at each voxel
rho
ridge penalty increases robustness to outliers but also makes image converge to average
usecor
employ correlation as local similarity
boundary.condition
one of 'image' 'mean' 'NA'
rSearch
radius of search, default is 2
jifImage
the current estimated jif image (helps speed slice by slice)
imputeList
2nd modality to impute
imputedImage
current estimate of 2nd modality

Value

approximated image, segmentation and probabilities

Examples

Run this code

set.seed(123)
ref<-antsImageRead( getANTsRData("r16"))
ref<-resampleImage(ref,c(50,50),1,0)
ref<-iMath(ref,"Normalize")
mi<-antsImageRead( getANTsRData("r27"))
mi2<-antsImageRead( getANTsRData("r30"))
mi3<-antsImageRead( getANTsRData("r62"))
mi4<-antsImageRead( getANTsRData("r64"))
mi5<-antsImageRead( getANTsRData("r85"))
refmask<-getMask(ref)
refmask<-iMath(refmask,"ME",2) # just to speed things up
ilist<-list(mi,mi2,mi3,mi4,mi5)
implist<-list()
for ( i in 1:length(ilist) )
 {
 ilist[[i]]<-iMath(ilist[[i]],"Normalize")
 mytx<-antsRegistration(fixed=ref , moving=ilist[[i]] ,
   typeofTransform = c("Affine") )
 mywarpedimage<-antsApplyTransforms(fixed=ref,moving=ilist[[i]],
   transformlist=mytx$fwdtransforms)
 ilist[[i]]=mywarpedimage
 implist[[i]]=mywarpedimage %>% iMath("Laplacian")
 }
r<-2
d<-2
pp<-jointIntensityFusion( ref, refmask, ilist, rSearch=1, rad=rep(r,d) )
pp<-jointIntensityFusion( ref, refmask, ilist, rSearch=1, rad=rep(r,d),
  imputeList=implist )

Run the code above in your browser using DataLab