9.4 Tesla MRI in focal epilepsy patients with high-resolution surface-based profiling of focal cortical dysplasias
The 8 matches
- [1] § Methods › Surface-based analysis › Surface-based features and lesion profiles ↔ map_vol_to_surf_features.py, lines 66–112 · score 0.76 · N4 bias field, MPRAGE T1w, mri_coreg, intensity, FLAIR, volumes
- [2] § Methods › Surface-based analysis › Registration to a template space ↔ roi_vol_to_label_fsaveragesym.py, lines 82–110 · score 0.72 · geodesic distance, field strength, cortical surface, hemisphere, FreeSurfer, centroid
- [3] § Methods › MRI data acquisition › 9.4T MRI ↔ map_vol_to_surf_features.py, lines 156–196 · score 0.64 · T1 maps, slabs, MP2RAGE, GRE, offline, Echoes
- [4] § Methods › Surface-based analysis › High-resolution profiling of T2* data ↔ plot_laynii.ipynb, lines 302–333 · score 0.62 · lesion centroid, target profile, scatterplot, RMSE, laynii, voxel
- [5] § Methods › Surface-based analysis › Segmentation and cortical surface reconstruction ↔ mp2rage_robust_denoise.py, lines 10–81 · score 0.60 · uniform T1, MP2RAGE, denoised, beta
- [6] § Methods › Surface-based analysis › Segmentation and cortical surface reconstruction ↔ map_vol_to_surf_features.py, lines 156–196 · score 0.60 · N4 bias field, MP2RAGE, FreeSurfer, brain
- [7] § Methods › Surface-based analysis › Registration to a template space ↔ plot_surf_features.ipynb, lines 161–254 · score 0.58 · contralateral hemisphere, homotopic regions, lesional, pial
- [8] § Methods › MRI data acquisition › 9.4T MRI ↔ mp2rage_robust_denoise.py, lines 10–81 · score 0.50 · UNI, positioned, MP2RAGE, coil, inversion, Max
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 410 lines · 20 KB · no license · 3 matches
- import os
- import glob
- import shutil
- import argparse
- import numpy as np
- import scipy.ndimage
- import nibabel as nib
- import ants
- import dataset_paths
- import util
- def surface_features(freesurfer_dir, subj_id, threads=1):
- os.environ['SUBJECTS_DIR'] = freesurfer_dir
- vols_3T, vols_94T = coreg_other_vols(freesurfer_dir, subj_id, return_existing_vols=False, threads=threads)
- reestimate_thickness_max(freesurfer_dir, subj_id)
- reestimate_w_g_contrast(freesurfer_dir, f'sub-{subj_id}_3T')
- reestimate_w_g_contrast(freesurfer_dir, f'sub-{subj_id}_94T')
- sample_vol2surf_all_volumes(freesurfer_dir, subj_id, vols_3T, vols_94T)
- resample_surf_features_fsaverage_sym(freesurfer_dir,
- f'sub-{subj_id}_3T',
- f'{freesurfer_dir}/sub-{subj_id}_3T/new/surf')
- resample_surf_features_fsaverage_sym(freesurfer_dir,
- f'sub-{subj_id}_94T',
- f'{freesurfer_dir}/sub-{subj_id}_94T/new/surf')
- def normalize_intensities(freesurfer_subj_folder, input_filename, output_filename):
- filename_aseg = f'{freesurfer_subj_folder}/mri/aseg.mgz'
- aseg = nib.load(filename_aseg)
- # select lh and rh white matter (indices 2 and 41) and cortex (indices 3 and 42)
- wm = np.isin(aseg.get_fdata(),[2, 41]) #.astype(float)
- cortex = np.isin(aseg.get_fdata(),[3, 42])
- # erode
- strel = scipy.ndimage.generate_binary_structure(3, 1)
- wm_eroded = scipy.ndimage.binary_erosion(wm, strel)
- cortex_eroded = scipy.ndimage.binary_erosion(cortex, strel)
- image = nib.load(input_filename)
- image_data = image.get_fdata()
- wm_median = np.median(image_data[wm_eroded])
- cortex_median = np.median(image_data[cortex_eroded])
- if 'FLAIR' in input_filename: # T2/FLAIR-contrast, i.e.: cortex has higher intensities than white matter
- normalized = (image_data - wm_median) / (cortex_median - wm_median)
- else:
- normalized = (image_data - cortex_median) / (wm_median - cortex_median)
- output = nib.Nifti1Image(normalized, image.affine, image.header)
- nib.save(output, output_filename)
- def select_single_path(paths, subj_id, b0, sequence):
- path = paths[(paths['subj_id'] == subj_id) & (paths['B0'] == b0) & (paths['sequence'] == sequence)]['path'].values
- if len(path) == 1:
- return path[0]
- elif len(path) == 0:
- return None
- else:
- raise ValueError(f'More than 1 path found for {subj_id} {b0} {sequence}')
- def coreg_other_vols(freesurfer_dir, subj_id, return_existing_vols=False, threads=1):
- paths = dataset_paths.get_3T94T_paths()
- # 3T #####################
- freesurfer_id_3T = f'sub-{subj_id}_3T'
- outdir = f'{freesurfer_dir}/{freesurfer_id_3T}/new'
- os.makedirs(outdir, exist_ok=True)
- vols_3T = []
- # FLAIR
- path_FLAIR_3T = select_single_path(paths, subj_id, '3T', 'FLAIR')
- outpath_FLAIR_3T = f'{outdir}/FLAIR_N4_to_orig_norm.nii.gz'
- if path_FLAIR_3T is not None:
- # N4 bias field correction
- FLAIR_N4_path = f'{outdir}/FLAIR_N4.nii.gz'
- im_FLAIR = ants.image_read(path_FLAIR_3T)
- im_FLAIR_N4 = ants.n4_bias_field_correction(im_FLAIR,
- convergence={'iters': [50, 50, 50, 50], 'tol': 1e-7},
- verbose=False)
- ants.image_write(im_FLAIR_N4, FLAIR_N4_path)
- # coreg with ref mask (because there is much extra-cerebral tissue in
- # FLAIR and good grey-white contrast in the brain)
- FLAIR_reg_path = f'{outdir}/FLAIR_N4_to_orig_reg.lta'
- cmd = f'mri_coreg --mov {FLAIR_N4_path} --ref {outdir}/../mri/orig.mgz --reg {FLAIR_reg_path} --s {freesurfer_id_3T} --dof 12 --threads {threads}'
- util.bash_run(cmd)
- FLAIR_N4_to_orig_path = f'{outdir}/FLAIR_N4_to_orig.nii.gz'
- cmd = f'mri_vol2vol --mov {FLAIR_N4_path} --o {FLAIR_N4_to_orig_path} --reg {FLAIR_reg_path} --fstarg --trilinear'
- util.bash_run(cmd)
- # normalize
- normalize_intensities(f'{freesurfer_dir}/{freesurfer_id_3T}', FLAIR_N4_to_orig_path, outpath_FLAIR_3T)
- vols_3T.append(outpath_FLAIR_3T)
- # MPRAGE T1w
- path_T1w_3T = select_single_path(paths, subj_id, '3T', 'T1w')
- outpath_T1w_3T = f'{outdir}/T1w_N4_to_orig_norm.nii.gz'
- if path_T1w_3T is not None:
- # N4 bias field correction
- T1w_N4_path = f'{outdir}/T1w_N4.nii.gz'
- im_T1w = ants.image_read(path_T1w_3T)
- im_T1w_N4 = ants.n4_bias_field_correction(im_T1w,
- convergence={'iters': [50, 50, 50, 50], 'tol': 1e-7},
- verbose=False)
- ants.image_write(im_T1w_N4, T1w_N4_path)
- # coreg with ref mask (because there is much extra-cerebral tissue in
- # the T1w and good grey-white contrast in the brain)
- T1w_reg_path = f'{outdir}/T1w_N4_to_orig_reg.lta'
- cmd = f'mri_coreg --mov {T1w_N4_path} --ref {outdir}/../mri/orig.mgz --reg {T1w_reg_path} --s {freesurfer_id_3T} --dof 12 --threads {threads}'
- util.bash_run(cmd)
- T1w_N4_to_orig_path = f'{outdir}/T1w_N4_to_orig.nii.gz'
- cmd = f'mri_vol2vol --mov {T1w_N4_path} --o {T1w_N4_to_orig_path} --reg {T1w_reg_path} --fstarg --trilinear'
- util.bash_run(cmd)
- # normalize
- normalize_intensities(f'{freesurfer_dir}/{freesurfer_id_3T}', T1w_N4_to_orig_path, outpath_T1w_3T)
- vols_3T.append(outpath_T1w_3T)
- # MP2RAGE UNIT1 3T
- path_UNIT1_3T = select_single_path(paths, subj_id, '3T', 'UNIT1')
- outpath_UNIT1_3T = f'{outdir}/UNIT1_conform_orig.nii.gz'
- if path_UNIT1_3T is not None:
- # this needs to be output type float because mri_convert otherwise converts to uchar (8bit int)
- cmd = f'mri_convert {path_UNIT1_3T} {outdir}/UNIT1_conform_orig.nii.gz --conform -odt float'
- util.bash_run(cmd)
- vols_3T.append(outpath_UNIT1_3T)
- # T1map 3T
- path_T1map_3T = select_single_path(paths, subj_id, '3T', 'T1map')
- outpath_T1map_3T = f'{outdir}/T1map_conform_orig.nii.gz'
- if path_T1map_3T is not None:
- # this needs to be output type float because mri_convert otherwise converts to uchar (8bit int)
- cmd = f'mri_convert {path_T1map_3T} {outdir}/T1map_conform_orig.nii.gz --conform -odt float'
- util.bash_run(cmd)
- vols_3T.append(outpath_T1map_3T)
- # 94T #####################
- freesurfer_id_94T = f'sub-{subj_id}_94T'
- outdir = f'{freesurfer_dir}/{freesurfer_id_94T}/new'
- os.makedirs(outdir, exist_ok=True)
- vols_94T = []
- # MP2RAGE UNIT1 94T
- path_UNIT1_94T = select_single_path(paths, subj_id, '94T', 'UNIT1')
- outpath_UNIT1_94T = f'{outdir}/UNIT1_conform_orig.nii.gz'
- if path_UNIT1_94T is not None:
- # this needs to be output type float because mri_convert otherwise converts to uchar (8bit int)
- cmd = f'mri_convert {path_UNIT1_94T} {outdir}/UNIT1_conform_orig.nii.gz -cm -odt float'
- util.bash_run(cmd)
- vols_94T.append(outpath_UNIT1_94T)
- # T1map
- path_T1map_94T = select_single_path(paths, subj_id, '94T', 'T1map')
- outpath_T1map_94T = f'{outdir}/T1map_conform_orig.nii.gz'
- if path_T1map_94T is not None:
- # this needs to be output type float because mri_convert otherwise converts to uchar (8bit int)
- cmd = f'mri_convert {path_T1map_94T} {outdir}/T1map_conform_orig.nii.gz -cm -odt float'
- util.bash_run(cmd)
- vols_94T.append(outpath_T1map_94T)
- # QSM 3DFLASH echo 1, we need to coregister this to be able to align the QSM data
- path_GREecho1_94T = select_single_path(paths, subj_id, '94T', 'GREecho1')
- if path_GREecho1_94T is not None:
- # N4 bias field correction
- GREecho1_offline_N4_path = f'{outdir}/GREecho1_offline_N4.nii.gz'
- im_GREecho1_offline = ants.image_read(path_GREecho1_94T)
- im_GREecho1_offline_N4 = ants.n4_bias_field_correction(im_GREecho1_offline,
- convergence={'iters': [50, 50, 50, 50], 'tol': 1e-7},
- verbose=False)
- ants.image_write(im_GREecho1_offline_N4, GREecho1_offline_N4_path)
- # coreg without ref mask (because GRE is a slab only and not such a
- # good grey-white contrast in the brain), so skull and dura aid in
- # registration
- GREecho1_offline_reg_path = f'{outdir}/GREecho1_offline_N4_to_orig_reg.lta'
- cmd = f'mri_coreg --mov {GREecho1_offline_N4_path} --ref {outdir}/../mri/orig.mgz --reg {GREecho1_offline_reg_path} --s {freesurfer_id_94T} --no-ref-mask --dof 12 --threads {threads}'
- util.bash_run(cmd)
- GREecho1_offline_N4_to_orig_path = f'{outdir}/GREecho1_offline_N4_to_orig.nii.gz'
- cmd = f'mri_vol2vol --mov {GREecho1_offline_N4_path} --o {GREecho1_offline_N4_to_orig_path} --reg {GREecho1_offline_reg_path} --fstarg --trilinear'
- util.bash_run(cmd)
- # QSM Tke 12
- path_QSMTke12_94T = select_single_path(paths, subj_id, '94T', 'QSMTke12')
- QSMTKe12_to_orig_path = f'{outdir}/QSMTke12_to_orig.nii.gz'
- cmd = f'mri_vol2vol --mov {path_QSMTke12_94T} --o {QSMTKe12_to_orig_path} --reg {GREecho1_offline_reg_path} --fstarg --trilinear'
- util.bash_run(cmd)
- vols_94T.append(QSMTKe12_to_orig_path)
- # QSM Tke 3
- path_QSMTke3_94T = select_single_path(paths, subj_id, '94T', 'QSMTke3')
- QSMTke3_to_orig_path = f'{outdir}/QSMTke3_to_orig.nii.gz'
- cmd = f'mri_vol2vol --mov {path_QSMTke3_94T} --o {QSMTke3_to_orig_path} --reg {GREecho1_offline_reg_path} --fstarg --trilinear'
- util.bash_run(cmd)
- vols_94T.append(QSMTke3_to_orig_path)
- # a different echo 1 in alignment with the R2star
- path_R2star_scanner_94T = select_single_path(paths, subj_id, '94T', 'R2star_scanner')
- path_GREecho1_scanner_94T = select_single_path(paths, subj_id, '94T', 'GREecho1_scanner')
- if path_R2star_scanner_94T is not None:
- if not subj_id == 'P009': # special case for P009, see below
- # coregister the scanner reconstruction echo 1 to the offline reconstruciton echo 1
- GREecho1_scanner_to_offline_reg_path = f'{outdir}/GREecho1_scanner_to_offline_reg.lta'
- cmd = f'mri_coreg --mov {path_GREecho1_scanner_94T} --ref {path_GREecho1_94T} --reg {GREecho1_scanner_to_offline_reg_path} --s {freesurfer_id_94T} --no-ref-mask --dof 12 --threads {threads}'
- util.bash_run(cmd)
- # combine the two registrations
- GREecho1_scanner_to_orig_reg_path = f'{outdir}/GREecho1_scanner_to_orig_reg.lta'
- cmd = f'mri_concatenate_lta {GREecho1_scanner_to_offline_reg_path} {GREecho1_offline_reg_path} {GREecho1_scanner_to_orig_reg_path}'
- util.bash_run(cmd)
- GREecho1_scanner_to_orig_path = f'{outdir}/GREecho1_scanner_to_orig.nii.gz'
- cmd = f'mri_vol2vol --mov {path_GREecho1_scanner_94T} --o {GREecho1_scanner_to_orig_path} --reg {GREecho1_scanner_to_orig_reg_path} --fstarg --trilinear'
- util.bash_run(cmd)
- # R2star is in register with the scanner reconstruction echo 1
- out = f'{outdir}/R2star_to_orig.nii.gz'
- cmd = f'mri_vol2vol --mov {path_R2star_scanner_94T} --o {out} --reg {GREecho1_scanner_to_orig_reg_path} --fstarg --trilinear'
- util.bash_run(cmd)
- vols_94T.append(out)
- # also the T2starmap
- path_T2star_scanner_94T = glob.glob(f'data/derivatives/T2starmaps/sub-{subj_id}/**/*T2starmap.nii.gz', recursive=True)
- if len(path_T2star_scanner_94T) == 1:
- path_T2star_scanner_94T = path_T2star_scanner_94T[0]
- out = f'{outdir}/T2star_to_orig.nii.gz'
- cmd = f'mri_vol2vol --mov {path_T2star_scanner_94T} --o {out} --reg {GREecho1_scanner_to_orig_reg_path} --fstarg --trilinear'
- util.bash_run(cmd)
- vols_94T.append(out)
- else:
- print(f'No unique T2star path found for subject {subj_id}')
- else: #special case for P009
- # for P009, the R2star was reconstructed offline, so is in register with
- # the GREecho1_94T and other files
- out = f'{outdir}/R2star_to_orig.nii.gz'
- cmd = f'mri_vol2vol --mov {path_R2star_scanner_94T} --o {out} --reg {GREecho1_offline_reg_path} --fstarg --trilinear'
- util.bash_run(cmd)
- vols_94T.append(out)
- # T2starmap
- path_T2star_scanner_94T = glob.glob(f'data/derivatives/T2starmaps/sub-{subj_id}/**/*T2starmap.nii.gz', recursive=True)
- if len(path_T2star_scanner_94T) == 1:
- path_T2star_scanner_94T = path_T2star_scanner_94T[0]
- out = f'{outdir}/T2star_to_orig.nii.gz'
- cmd = f'mri_vol2vol --mov {path_T2star_scanner_94T} --o {out} --reg {GREecho1_offline_reg_path} --fstarg --trilinear'
- util.bash_run(cmd)
- vols_94T.append(out)
- else:
- print(f'No unique T2star path found for subject {subj_id}')
- return vols_3T, vols_94T
- def reestimate_thickness_max(freesurfer_dir, subj_id, max = 15.0):
- """resample cortical thickness with maximum of 15 mm (instead of default 5 mm)"""
- # 3T #####################
- freesurfer_id_3T = f'sub-{subj_id}_3T'
- outdir = f'{freesurfer_dir}/{freesurfer_id_3T}/new/surf'
- os.makedirs(outdir, exist_ok=True)
- for hemi in ['lh', 'rh']:
- if os.path.exists(f'{outdir}/nthickness_{hemi}.mgh'):
- continue
- cmd = f'mris_thickness -max {max} {freesurfer_id_3T} {hemi} {outdir}/nthickness_{hemi}.mgh'
- util.bash_run(cmd)
- # because mris_thickness always prepends a lh/rh to the output filename, rename the file
- os.rename(f'{outdir}/{hemi}.nthickness_{hemi}.mgh',f'{outdir}/nthickness_{hemi}.mgh')
- # 94T #####################
- freesurfer_id_94T = f'sub-{subj_id}_94T'
- outdir = f'{freesurfer_dir}/{freesurfer_id_94T}/new/surf'
- os.makedirs(outdir, exist_ok=True)
- for hemi in ['lh', 'rh']:
- if os.path.exists(f'{outdir}/nthickness_{hemi}.mgh'):
- continue
- cmd = f'mris_thickness -max {max} {freesurfer_id_94T} {hemi} {outdir}/nthickness_{hemi}.mgh'
- util.bash_run(cmd)
- # because mris_thickness always prepends a lh/rh to the output filename, rename the file
- os.rename(f'{outdir}/{hemi}.nthickness_{hemi}.mgh',f'{outdir}/nthickness_{hemi}.mgh')
- def reestimate_w_g_contrast(freesurfer_dir, freesurfer_id):
- outdir = f'{freesurfer_dir}/{freesurfer_id}/new/surf'
- os.makedirs(outdir, exist_ok=True)
- UNIT1_nifti = f'{freesurfer_dir}/{freesurfer_id}/new/UNIT1_conform_orig.nii.gz'
- UNIT1_mgz = f'{freesurfer_dir}/{freesurfer_id}/new/UNIT1_conform_orig.mgz'
- if os.path.exists(UNIT1_nifti):
- UNIT1 = nib.load(UNIT1_nifti)
- UNIT1_data = UNIT1.get_fdata()
- if UNIT1_data.min() < 0:
- # if the UNIT1 has negative values, it is probably in the range [-0.5,0.5]
- # needs to be rescaled to positive values
- UNIT1_data = UNIT1_data + 0.5
- # write back to new file
- UNIT1_nifti = f'{freesurfer_dir}/{freesurfer_id}/new/UNIT1_conform_orig_pos.nii.gz'
- nib.save(nib.Nifti1Image(UNIT1_data, UNIT1.affine, UNIT1.header), UNIT1_nifti)
- cmd = f'mri_convert {UNIT1_nifti} {UNIT1_mgz}'
- util.bash_run(cmd)
- cmd = f'pctsurfcon --s {freesurfer_id} --fsvol ../new/UNIT1_conform_orig --b w-g.pct.UNIT1_conform_orig'
- util.bash_run(cmd)
- for hemi in ['lh', 'rh']:
- surf_file = f'{freesurfer_dir}/{freesurfer_id}/surf/{hemi}.w-g.pct.UNIT1_conform_orig.mgh'
- shutil.move(surf_file,f'{outdir}/w-g.pct.UNIT1_{hemi}.mgh')
- def sample_vol2surf(freesurfer_dir,
- freesurfer_subjid,
- source_vol,
- projfracs,
- projdists,
- projabs):
- outdir = f'{freesurfer_dir}/{freesurfer_subjid}/new/surf'
- os.makedirs(outdir, exist_ok=True)
- source_base = os.path.basename(source_vol).replace('.nii.gz','')
- for hemi in ['lh', 'rh']:
- for projfrac in projfracs:
- out = f'{outdir}/{source_base}_projrel{projfrac}_{hemi}.mgh'
- if not os.path.isfile(out):
- cmd = f'mri_vol2surf --src {source_vol} --out {out} --cortex --hemi {hemi} --regheader {freesurfer_subjid} --projfrac {projfrac}'
- util.bash_run(cmd)
- for projdist in projdists:
- out = f'{outdir}/{source_base}_projrel{projdist}_{hemi}.mgh'
- if not os.path.isfile(out):
- cmd = f'mri_vol2surf --src {source_vol} --out {out} --cortex --hemi {hemi} --regheader {freesurfer_subjid} --projdist {projdist}'
- util.bash_run(cmd)
- for projab in projabs:
- out = f'{outdir}/{source_base}_projabs{projab}_{hemi}.mgh'
- if not os.path.isfile(out):
- cmd = f'mri_vol2surf --src {source_vol} --out {out} --cortex --hemi {hemi} --regheader {freesurfer_subjid} --projdist {projab} --surf pial'
- util.bash_run(cmd)
- def sample_vol2surf_all_volumes(freesurfer_dir,
- subj_id,
- vols_3T,
- vols_94T,
- projfracs = [0.0, 0.25, 0.5, 0.75],
- projdists = [-1.0, -2.0],
- projabs = [-1.0, -2.0, -3.0, -4.0, -5.0, -6.0]):
- for v in vols_3T:
- sample_vol2surf(freesurfer_dir,
- f'sub-{subj_id}_3T',
- v,
- projfracs,
- projdists,
- projabs)
- for v in vols_94T:
- sample_vol2surf(freesurfer_dir,
- f'sub-{subj_id}_94T',
- v,
- projfracs,
- projdists,
- projabs)
- def resample_surf_features_fsaverage_sym(freesurfer_dir, freesufer_subjid, folder):
- surf_features_lh = glob.glob(f'{folder}/*lh.mgh')
- # filter out fsaverage_sym_lh files in case this is re-run
- surf_features_lh = [f for f in surf_features_lh if not 'fsaverage_sym' in f]
- surf_features_rh = glob.glob(f'{folder}/*rh.mgh')
- for f in surf_features_lh:
- base = f.replace('.mgh','')
- if os.path.isfile(f'{base}_fsaverage_sym_lh.mgh') and not 'abs' in base:
- continue
- cmd = f'mris_apply_reg --src {f} --trg {base}_fsaverage_sym_lh.mgh --streg {freesurfer_dir}/{freesufer_subjid}/surf/lh.fsaverage_sym.sphere.reg {freesurfer_dir}/fsaverage_sym/surf/lh.sphere.reg'
- util.bash_run(cmd)
- for f in surf_features_rh:
- base = f.replace('.mgh','')
- if os.path.isfile(f'{base}_fsaverage_sym_lh.mgh') and not 'abs' in base:
- continue
- cmd = f'mris_apply_reg --src {f} --trg {base}_fsaverage_sym_lh.mgh --streg {freesurfer_dir}/{freesufer_subjid}/xhemi/surf/lh.fsaverage_sym.sphere.reg {freesurfer_dir}/fsaverage_sym/surf/lh.sphere.reg'
- util.bash_run(cmd)
- if __name__ == '__main__':
- argparser = argparse.ArgumentParser(description='map volume data to freesurfer surface reconstructions')
- argparser.add_argument('freesurfer_dir', type=str, help='Path to freesurfer directory')
- argparser.add_argument('subj_id', type=str, help='Subject ID (e.g., P001)')
- argparser.add_argument('--threads', type=int, default=1, help='Number of threads to use for coregistration (default: 1)')
- args = argparser.parse_args()
- surface_features(freesurfer_dir=args.freesurfer_dir,
- subj_id=args.subj_id,
- threads=args.threads)
map_vol_to_surf_features.py at commit dda99e4, no license · at the source
Overview
- Department of Neurology and Epileptology, University of Tuebingen Medical Faculty, Tuebingen, Germany
- Hertie Institute for Clinical Brain Research, University of Tuebingen Medical Faculty, Tuebingen, Germany
- School of Biomedical Engineering and Imaging Sciences, King’s College London, London, UK
- Department of Neuroradiology, University Hospital Tuebingen and University of Tuebingen, Tuebingen, Germany
- Department of High-Field Magnetic Resonance, Max-Planck-Institute for Biological Cybernetics, Tuebingen, Germany
- Biomedical Magnetic Resonance, University Hospital of Tübingen, Tübingen, Germany
- UCL Great Ormond Street Institute of Child Health, University College London, London, UK
- German Center for Neurodegenerative Diseases (DZNE), Tübingen, Germany
Abstract
Background: The detection of subtle epileptogenic lesions such as focal cortical dysplasias (FCDs) is a clinical challenge in the management of drug-resistant focal epilepsy (DRFE). Ultra-high field (UHF) MRI offers increased signal-to-noise ratios and spatial resolution compared to 3 Tesla (T) MRI and may improve diagnostic yield. Here, we present a 9.4T MRI cohort study of patients with DRFE.
Methods: We recruited n=
Results: No new epileptogenic lesions were visually identified at 9.4T in 3T MRI negative patients. In the two patients with histopathologically confirmed lesions, the FCD IIb lesions were visible with distinct qualitative and quantitative features at both field strengths. One of these FCD IIb showed a focal cortical T2* reduction at 9.4T that could here be quantified via automated cortical profiling, consistent with the previously described “black line sign”.
Conclusion: 9.4T MRI findings in epileptogenic lesions underlying DRFE are consistent with those on 3T MRI. While additional lesions were not identified in patients with negative 3T MRI, higher resolution T2*-weighted sequences can reveal a feature not seen at 3T: Cortical profiling of FCDs highlights the black line sign and can possibly help refine surgical or ablation targeting for some FCDs. Further optimization of UHF protocols and analysis methods on larger cohorts may reveal clinically applicable diagnostic benefits.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 8 matches between paragraphs and lines of code.
ckronlage/3T9T_profiling_pub
dda99e4595514ee89f06624535355b0d7f248f79, 16 February 2026Availability: 1 check, the latest on 29 September 2026: the link answers
- 29 September 2026: the link answers
15 files
- R2star_to_T2star.py, Python, 33 lines
- antsN4.py, Python, 67 lines
- dataset_paths.py, Python, 77 lines
- gather_surf_features.py, Python, 117 lines
- map_vol_to_surf_features
.py , Python, 410 lines, 3 matches - mp2rage_robust_denoise.p
y , Python, 100 lines, 2 matches - plot_freeview_lesions_3T
9T_surfs.py , Python, 53 lines - plot_laynii.ipynb, Jupyter, 608 lines, 1 match
- plot_lesions_3T9T.ipynb, Jupyter, 222 lines
- plot_surf_features.ipynb
, Jupyter, 976 lines, 1 match - roi_vol_to_label_fsavera
gesym.py , Python, 195 lines, 1 match - run_xhemi.py, Python, 73 lines
- snakemake_local.sh, Shell, 2 lines
- util.py, Python, 18 lines
- README.md, Text, 46 lines
The paper's code and data availability statement is in the Data section.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 14 scripts, each with its path and the digest of its content;
- 8 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data and code availability
The healthy volunteer 9.4T MP2RAGE data has been published as part of a larger dataset40. It is currently not possible to make the patient imaging data openly accessible due to data protection regulations as specified in the ethics application approved by the local ethics committee (Tübingen University, reference number 390/
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 29 September 2026: the first record
Recorded: type, journal, dates, 13 authors, 5 funders, 46 references.
Cite
This paper
Kronlage, C., Martin, P., Bender, B., Hagberg, G. E., Bause, J., Loureiro, J. R., Ripart, M., Adler, S., Wagstyl, K., Lerche, H., Focke, N. K., Scheffler, K., & Kuehn, E. (2026). 9.4 Tesla MRI in focal epilepsy patients with high-resolution surface-based profiling of focal cortical dysplasias. medRxiv (preprint). https://
BibTeX
@article{kronlage20269,
author = {Kronlage, Cornelius and Martin, Pascal and Bender, Benjamin and Hagberg, Gisela E. and Bause, Jonas and Loureiro, Joana RA and Ripart, Mathilde and Adler, Sophie and Wagstyl, Konrad and Lerche, Holger and Focke, Niels KN and Scheffler, Klaus and Kuehn, Esther},
title = {{9.4 Tesla MRI in focal epilepsy patients with high-resolution surface-based profiling of focal cortical dysplasias}},
journal = {medRxiv (preprint)},
year = {2026},
month = apr,
publisher = {medRxiv},
doi = {10.64898/
url = {https://
}
RIS
TY - JOUR
AU - Kronlage, Cornelius
AU - Martin, Pascal
AU - Bender, Benjamin
AU - Hagberg, Gisela E.
AU - Bause, Jonas
AU - Loureiro, Joana RA
AU - Ripart, Mathilde
AU - Adler, Sophie
AU - Wagstyl, Konrad
AU - Lerche, Holger
AU - Focke, Niels KN
AU - Scheffler, Klaus
AU - Kuehn, Esther
TI - 9.4 Tesla MRI in focal epilepsy patients with high-resolution surface-based profiling of focal cortical dysplasias
T2 - medRxiv (preprint)
J2 - medRxiv
PY - 2026
DA - 2026/
PB - medRxiv
DO - 10.64898/
UR - https://
ER -
CSL-JSON
{
"id": "10.64898/
"type": "article",
"title": "9.4 Tesla MRI in focal epilepsy patients with high-resolution surface-based profiling of focal cortical dysplasias",
"container-title": "medRxiv (preprint)",
"author": [
{
"family": "Kronlage",
"given": "Cornelius"
},
{
"family": "Martin",
"given": "Pascal"
},
{
"family": "Bender",
"given": "Benjamin"
},
{
"family": "Hagberg",
"given": "Gisela E."
},
{
"family": "Bause",
"given": "Jonas"
},
{
"family": "Loureiro",
"given": "Joana RA"
},
{
"family": "Ripart",
"given": "Mathilde"
},
{
"family": "Adler",
"given": "Sophie"
},
{
"family": "Wagstyl",
"given": "Konrad"
},
{
"family": "Lerche",
"given": "Holger"
},
{
"family": "Focke",
"given": "Niels KN"
},
{
"family": "Scheffler",
"given": "Klaus"
},
{
"family": "Kuehn",
"given": "Esther"
}
],
"container-title-short":
"DOI": "10.64898/
"publisher": "medRxiv",
"URL": "https://
"issued": {
"date-parts": [
[
2026,
4,
7
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1007/s00234-026-04103-8 [code]
- Enhanced detection of subtle cortical abnormalities in focal epilepsy using 7 T MRI surface-based models and graph neural networks.Journal: NeuroradiologyIn common: FreeSurfer, Nilearn, NiBabel, 5 other tools, epilepsy, structural MRI / diffusion, 9 references
- [2] doi:10.1002/epi4.70336 [code]
- Quantifying extra-lesional interhemispheric cortical asymmetry in focal cortical dysplasia type II.Journal: Epilepsia openIn common: Nilearn, NiBabel, seaborn, 4 other tools, epilepsy, structural MRI / diffusion, clinical / translational, 5 references
- [3] doi:10.1016/j.isci.2026.117446 [code]
- Volume-inflation registration (INFREG) for morphometric analysis of human focal cortical dysplasia type II.Journal: iScienceIn common: FreeSurfer, NiBabel, pandas, 3 other tools, epilepsy, structural MRI / diffusion, 5 references
- [4] doi:10.1162/imag.a.1366 [code]
- MICAFlow: Fast and robust MRI preprocessing bridging research neuroimaging and clinical practice.Journal: Imaging neuroscience (Cambridge, Mass.)In common: ANTs, FreeSurfer, Nilearn, 4 other tools, epilepsy, structural MRI / diffusion, 4 references
- [5] doi:10.64898/2026.08.18.26360725 [code]
- Temporal pole blurring in hippocampal sclerosis reflects seizure-disrupted myelinationJournal: medRxiv (preprint)In common: FreeSurfer, Nilearn, NiBabel, 5 other tools, epilepsy, structural MRI / diffusion, 3 references
- [6] doi:10.1038/s41467-026-71555-0 [code]
- A deep representation learning model to predict response to vagus nerve stimulation.Journal: Nature communicationsIn common: ANTs, FreeSurfer, NiBabel, 5 other tools, epilepsy, structural MRI / diffusion, clinical / translational, 3 references
- [7] doi:10.1162/imag.a.1362 [code]
- Human fMRI at 11.7T: Assessing feasibility, stability, and reliability on the Iseult scanner.Journal: Imaging neuroscience (Cambridge, Mass.)In common: ANTs, FreeSurfer, Nilearn, 6 other tools, 2 references
- [8] doi:10.1162/netn.a.547 [code]
- An evaluation of the efficacy of single-echo and multi-echo fMRI denoising strategies.Journal: Network neuroscience (Cambridge, Mass.)In common: ANTs, FreeSurfer, Nilearn, 6 other tools, 1 reference
- [9] doi:10.1371/journal.pbio.3003856 [code]
- Aging and metabolism contribute separately to brain-body health.Journal: PLoS biologyIn common: ANTs, FreeSurfer, Nilearn, 6 other tools, structural MRI / diffusion, clinical / translational
- [10] doi:10.1038/s41398-026-04157-5 [code]
- Association of glymphatic function with 40-Hz neural oscillations, systemic metabolic markers, and cognitive performance in healthy aging adults: An EEG and MRI study.Journal: Translational psychiatryIn common: ANTs, FreeSurfer, Nilearn, 6 other tools, structural MRI / diffusion, clinical / translational
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 14 scripts, and 8 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:e0b2c6c8798f7a24…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
