nigsp.operations.nifti.unmask¶
- nigsp.operations.nifti.unmask(data, mask, shape=None, asdata=None)[source]¶
Unmask 1D or 2D into an nD based on shape or asdata.
- Parameters:
- data
numpy.ndarray
(1D or 2D) The data to unmask.
- mask
numpy.ndarray
The nD mask to use to unwrap (unmask) the data. All elements different from 0 will be used as entries for data.
- shape
None
orlist
ofint
, optional List indicating shape of nD array.
- asdata
None
ornumpy.ndarray
, optional Array to take the same shape of.
- data
- Returns:
numpy.ndarray
The unmasked nD array version of data.
- Raises:
ValueError
If both shape and asdata are empty If the first dimension of data and the number of available voxels in mask do not match. If the mask shape does not match the first (mask)