02806a3dbb8250b6455ec63ac78348a08ba376e8,plot_nifti_simple.py,,,#,9

Before Change


fmri_masked = nifti_masker.fit_transform(dataset.func[0])

pl.figure()
pl.subplot(1, 2, 1)
pl.axis("off")
pl.title("original")
original = utils.check_niimg(dataset.func[0]).get_data()[..., 20, 0]
pl.imshow(np.rot90(original), interpolation="nearest", cmap=pl.cm.gray)

pl.subplot(1, 2, 2)
pl.axis("off")
pl.title("preprocessed")
pp = nifti_masker.inverse_transform(fmri_masked).get_data()[..., 20, 0]
pp[np.where(pp == 0)] = np.min(pp) - 1
pl.imshow(np.rot90(pp), interpolation="nearest", cmap=pl.cm.gray)

After Change



////// The same with a pipeline ////////////////////////////////////////////////////////////////////////////////////////////////////
from sklearn.pipeline import Pipeline
mask_ica = Pipeline([("masking", nifti_masker), ("ica", ica)])
components = mask_ica.inverse_transform(
        mask_ica.fit_transform(dataset.func[0]))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: nilearn/nilearn
Commit Name: 02806a3dbb8250b6455ec63ac78348a08ba376e8
Time: 2012-10-02
Author: alexandre.abraham@cea.fr
File Name: plot_nifti_simple.py
Class Name:
Method Name:


Project Name: nilearn/nilearn
Commit Name: 02806a3dbb8250b6455ec63ac78348a08ba376e8
Time: 2012-10-02
Author: alexandre.abraham@cea.fr
File Name: plot_nifti_simple.py
Class Name:
Method Name:


Project Name: nipy/dipy
Commit Name: 0d6fd37f57b187395ee3addc8d5a758337830f60
Time: 2015-02-04
Author: arokem@gmail.com
File Name: dipy/viz/regtools.py
Class Name:
Method Name: overlay_slices


Project Name: nipy/dipy
Commit Name: 0d6fd37f57b187395ee3addc8d5a758337830f60
Time: 2015-02-04
Author: arokem@gmail.com
File Name: dipy/viz/regtools.py
Class Name:
Method Name: plot_slices