You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Binning the principal gradient into 10 percentile block and create nifti's for each. Then compare each bin against the same neurosynth keywords as were used in the original paper.
The text was updated successfully, but these errors were encountered:
This is the bit of code that plots the entire principal gradient:
def rebuild_nii_individ(num):
onlyfiles = [f for f in listdir_nohidden('./data/Outputs/Regs/') if isfile(join('./data/Outputs/Regs/', f))]
for sub in onlyfiles:
data = np.load('./data/Outputs/Regs/%s' % sub)
a = data[:,num].copy()
nim = nib.load('cc400_roi_atlas.nii')
imdat=nim.get_data()
imdat_new = imdat.copy()
for n, i in enumerate(np.unique(imdat)):
if i != 0:
imdat_new[imdat == i] = a[n-1] * 10 # scaling factor. Could also try to get float values in nifti...
nim_out = nib.Nifti1Image(imdat_new, nim.get_affine(), nim.get_header())
nim_out.set_data_dtype('float32')
# to save:
nim_out.to_filename('res.nii')
nilearn.plotting.plot_epi(nim_out, cut_coords=(0,0,0))
Binning the principal gradient into 10 percentile block and create nifti's for each. Then compare each bin against the same neurosynth keywords as were used in the original paper.
The text was updated successfully, but these errors were encountered: