R/minc_hierarchical_anatomy.R
addVolumesToHierarchy.Rd
Takes a tree of anatomical hierarchies and adds volumes from anatGetAll
addVolumesToHierarchy(hdefs, volumes)
hdefs | The anatomical hierarchy |
---|---|
volumes | The matrix of volumes |
The input anatomical hierarchy with volumes added
Each node in the tree has two new attributes:
volumes - The matrix of volumes
meanVolume - The mean of the volumes of that node
Currently propagates volumes up the tree by summing. Future versions will add propagating through weighted means or other functions
# NOT RUN { abijson <- "allen.json" defs <- "Dorr_2008_Steadman_2013_Ullmann_2013_mapping_of_labels.csv" hdefs <- makeMICeDefsHierachical(defs, abijson) allvols <- anatGetAll(gf$filenames) hanat <- addVolumesToHierarchy(hdefs, allvols) # }