title: Nifti image into scikit learn
body: <p>I wanted to use scikit-learn Machine learning variation to do data processing of my neuroimaging data, specifically, fMRI data in Nifti file type. </p>
  
  <p>Nilearn provides the platform. However, I don't understand how the <a href="http://nilearn.github.io/auto_examples/manipulating_visualizing/plot_mask_computation.html" rel="nofollow">Nitimasker</a> working principle. How it converts 4D fMRI data to 2D data for scikit-learn.</p>
  
  <p>I have 4D data of 1 subject, i.e <code>(40, 64, 64, 1452)</code>, a Haxby data. I use <a href="http://nipy.org/nibabel/index.html" rel="nofollow">Nibabel</a> for accessing the images. If I want to process one planar, <code>[20, :, :, 1]</code> to <code>[20, :, :, 1452]</code>, could I <code>np.flatten</code> it to be the <code>[n_samples,n_features]</code> for scikit-learn platform?</p>