Dear colleagues,
I am trying to use group ICA (2 runs from same subject) from nilearn and trying to plot the BOLD signals specify to that specific component.
I am successful in creating ICA components using CANICA and Dict Learning method and given in tutorials. But when i try to plot the signals from the components. I can see the components are having only 3 dimensions. Where i couldn’t see the time course. I tried creating mask by cutting the coordinates of the extracted IC’s , but its not working out. Can somebody help?
for i, cur_img in enumerate(iter_img(canica_components_img)):
display=plot_stat_map(
cur_img,
display_mode=“z”,
title=f"IC {int(i)}",
cut_coords=1,
colorbar=False,
)
cut_coords= display.cut_coords
maps_masker = NiftiMapsMasker(maps_img=preprocessed_imgs[0],verbose=1, t_r=2.14)
time_series = maps_masker.fit_transform(cut_coords, confounds=None)
for time_serie, label in zip(time_series.T):
plt.plot(time_serie)
plt.title("Default Mode Network Time Series")
plt.xlabel("Scan number")
plt.ylabel("Normalized signal")
plt.legend()
plt.tight_layout()