def _apply_mask_to_4d_data(vol_data, mask_img):
mask_data = load_mask_data(mask_img)<EOL>return vol_data[mask_data], mask_data<EOL>
Parameters
----------
vol_data:
mask_img:

Returns
-------
masked_data, mask_indices

masked_data: numpy.ndarray
    2D array of series with shape (image number, voxel number)

Note
----
vol_data and mask_file must have the same shape.