Description Usage Arguments Value Author(s) Examples
View source: R/jlfPropagation.R
The JLF initialization is reused throughout a time series with an additional lag argument.
1 2 3 4 5 6 7 8 9 10 11 |
targetI |
antsImage list to be approximated |
targetIMask |
mask with value 1 |
atlasList |
list containing antsImages with intensity images |
rad |
neighborhood radius, default to 2 |
labelList |
optional list containing antsImages with segmentation labels |
rSearch |
radius of search, default is 3 |
lagValue |
number of prior images to use to fwd propagate JLF solution |
verbose |
boolean |
... |
arguments to pass to |
segmentation of time series
Brian B. Avants
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | ## Not run:
set.seed(123)
ref = ri( 1 ) %>% resampleImage( 4 ) %>% iMath( "Normalize" )
mi1 = ri( 2 )
mi2 = ri( 3 )
mi3 = ri( 4 )
mi4 = ri( 5 )
mi5 = ri( 6 )
refmask<-getMask( ref )
refmask<-iMath( refmask, "MD", 10 ) # just to speed things up
ilist<-list( mi1, mi2, mi3, mi4, mi5 )
seglist<-list()
for ( i in 1:length(ilist) )
{
ilist[[i]]<-iMath(ilist[[i]],"Normalize")
mytx<-antsRegistration(fixed=ref , moving=ilist[[i]] ,
typeofTransform = c("Affine"), verbose = TRUE )
mywarpedimage<-antsApplyTransforms(fixed=ref,
moving=ilist[[i]],
transformlist=mytx$fwdtransforms)
ilist[[i]]=mywarpedimage
seg<-thresholdImage( ilist[[i]],"Otsu", 3)
seglist[[i]]<-seg+1
}
tarlist = list(
iMath( ref, "GD", 3),
iMath( ref, "GD", 2),
iMath( ref, "GD", 1),
iMath( ref, "GD", 0),
iMath( ref, "GE", 1),
iMath( ref, "GE", 2),
iMath( ref, "GE", 3) )
pp = jlfProp( tarlist, refmask, ilist, rSearch=2,
labelList=seglist, rad = rep( 2, length( dim( ref ) ) ) )
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.