joinEigenanatomy joins the input matrix using a community membership approach.

joinEigenanatomy(
  datamatrix,
  mask = NULL,
  listEanatImages,
  graphdensity = 0.65,
  joinMethod = "walktrap",
  verbose = F
)

Arguments

datamatrix

input matrix before decomposition

mask

mask used to create datamatrix

listEanatImages

list containing pointers to eanat images

graphdensity

target graph density or densities to search over

joinMethod

see igraph's community detection

verbose

bool

Value

return(list(fusedlist = newelist, fusedproj = myproj, memberships = communitymembership , graph=gg, bestdensity=graphdensity ))

Author

Avants BB

Examples

if (FALSE) { # \dontrun{
# if you dont have images
mat <- replicate(100, rnorm(20))
mydecom <- sparseDecom(mat)
kk <- joinEigenanatomy(mat, mask = NULL, mydecom$eigenanatomyimages, 0.1)
# or select optimal parameter from a list
kk <- joinEigenanatomy(mat, mask = NULL, mydecom$eigenanatomyimages, c(1:10) / 50)
# something similar may be done with images
mask <- as.antsImage(t(as.matrix(array(rep(1, ncol(mat)), ncol(mat)))))
mydecom <- sparseDecom(mat, inmask = mask)
eanatimages <- matrixToImages(mydecom$eigenanatomyimages, mask)
kki <- joinEigenanatomy(mat, mask = mask, eanatimages, 0.1)
if (usePkg("igraph")) {
  mydecomf <- sparseDecom(mat,
    inmask = mask, initializationList = kki$fusedlist,
    sparseness = 0, nvecs = length(kki$fusedlist)
  )
}
} # }