calculate pca within a mask, to get co-var in 4d