addVolumesToHierarchy: Add volumes to an anatomical hierarchy

View source: R/minc_hierarchical_anatomy.R

addVolumesToHierarchyR Documentation

Add volumes to an anatomical hierarchy

Description

Takes a tree of anatomical hierarchies and adds volumes from anatGetAll

Usage

addVolumesToHierarchy(hdefs, volumes)

Arguments

hdefs

The anatomical hierarchy

volumes

The matrix of volumes

Details

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

Value

The input anatomical hierarchy with volumes added

Examples

## 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)

## End(Not run)

Mouse-Imaging-Centre/RMINC documentation built on Nov. 12, 2022, 1:50 p.m.