Convert a labeled image to an n x m binary matrix where n = number of voxels
and m = number of labels. Only includes values inside the provided mask while
including background ( img == 0 ) for consistency with timeseries2matrix and
other image to matrix operations.
defines target regions to be returned. if the target
label does not exist in the input label image, then the matrix will contain
a constant value of missingVal (default NA) in that row.