Learn R Programming

ANTsR (version 0.7.2.0)

readNormalizedPopulationData: Read normalized population from h5 file or directory

Description

This function reads a file created by writeNormalizedPopulationData.

Usage

readNormalizedPopulationData(filename)

Arguments

filename

input filename for hdf5 file.

Value

list containing demographics, imageMat, imageMask and imageBoolean

Examples

Run this code
# NOT RUN {
ilist = getANTsRData( "population" )
mask = getMask( ilist[[ 1 ]] )
imat = imageListToMatrix( ilist, mask )
demog = data.frame( age = c( 11, 7, 18, 22 ), sex = c("M","M","F","F") )
ibool = c( TRUE, TRUE, TRUE, FALSE )
tfn = tempfile(fileext=".h5")
if ( usePkg( "h5" ) ) writeNormalizedPopulationData( demog, imat, mask, ibool, tfn )
if ( usePkg( "h5" ) ) dlist = readNormalizedPopulationData( tfn )
# }

Run the code above in your browser using DataLab