Week of 2026-07-13

MRF-SEEG resection labels; mrfx scoping

Published

July 13, 2026

syn7T

Aim: get the BIDS conversion clean and hand the preprocessing pipeline to Mary before I go on service.

Went back to the dcm2bids conversion, which had been throwing “Several Pairing” warnings across the cohort. The cause was unguarded catch-all wildcard rules layered on top of the specific ones: a guarded *mp2rage* T1w rule (with an exclude block for INV1/INV2/UNI/UNI-DEN) sat above a second *MP2RAGE* T1w rule with no exclude, so every INV/UNI series matched both its own rule and the generic wildcard. I rebuilt the config to cover all 49 real protocol-name plus field-strength combinations in the cohort, plus the GRE magnitude/phase pairs disambiguated on ImageType (54 observed series total, localizer_32ch deliberately excluded). A verification script now confirms every sidecar resolves to exactly one description.

No reconversion needed, which was the open question — the prior batch run took a full day. dcm2bids --skip_dcm2niix reruns only the sidecar pairing and renaming against the new config, pointed at the existing tmp_dcm2bids/sub-XXX staging folder rather than the raw DICOM directory:

dcm2bids -d /Volumes/eegrvw/Imaging/7T/syn7T/tmp_dcm2bids/sub-050 -p sub-050 \
  -c code/dcm2bids_config.json --skip_dcm2niix --clobber --auto_extract_entities

--clobber overwrites the partial BIDS output already there. --force_dcm2bids isn’t wanted here since the tmp staging area itself is fine.

Walked Mary through the preprocessing sequence for the new scans so she can run it during service: SynthStrip on INV2, apply the INV2-derived mask to UNI-DEN, coregister 3T and UNI-DEN, re-run training. Handoff done.

Next: re-run the batch with the new config and confirm the sub-*/anat folders come out complete, with tmp_dcm2bids leftovers empty except for the one localizer per subject. Mary to report back on the training re-run.

MRF-SEEG

Aim: finish resection labelling so the resection-boundary analysis can proceed.

Finished labelling all SEEG contacts as resected vs. non-resected across the cohort, and as included vs. not included in the resection cavity per Alexopoulos. That clears the labelling backlog that was gating the resection-boundary and margin analyses for the thesis.

Next: build the detailed slide deck (needs a full workstation, so pushed to next Tuesday), schedule an individual subject review with Alexopoulos as he suggested, and start collating a database covering all MRF-SEEG patients rather than just the seizure-free subset.

mrfx

Aim: stand up a successor pipeline to MRF-SEEG that processes every available MRF-SEEG patient rather than the 13 seizure-free subset, and get the imaging data staged.

Named the project mrfx - short, path-friendly, and no longer implying it is version two of anything. Settled the architecture before writing any code: BIDS-shaped layout, manifest-driven off a single subjects.csv, derivatives written per stage, stages idempotent with .done sentinels and JSON provenance stubs. The governing convention is that every script reads subjects.csv and no script globs the filesystem, so the cohort is defined in exactly one place and a rerun is always safe.

Settled the estimand, which had been the real ambiguity. Primary is outcome-agnostic: does MRF track SEEG band power across the EZ/PZ/IZ/NIZ labels. Secondary treats outcome as an effect modifier, asking whether the relationship differs in patients who went on to an Engel I. This ordering matters because the original 13-patient framing had outcome baked into cohort selection, which is what the expansion is meant to undo. At least 16 non-lesional patients are available and may serve as the starting point.

Reviewed Balu’s folder. The patients split into those with PSD available but still needing processing and those where the data would have to be scraped first, which makes the SEEG side the rate-limiting step. Decided to defer the PSD work entirely for now: a large amount of neuroimaging has to happen first, and there is no point resolving the electrophysiology side while the imaging denominator is still unknown.

Data staging. The MRF source data lives on the T drive and needs to be copied into the new mrfx folder:

T:\Imaging\Multimodal\MRF\Recon_MRF_3T\Patients

Which files to pull is unresolved. The likely core is the quantitative T1/T2/PD maps in MRF space plus res_T1, which Spencer’s Curry workflow depends on by name. Whether the existing coregistration transforms come along or get re-derived from source volumes is the decision that shapes the rest of the manifest. Raw k-space and recon intermediates are out, since nothing is being re-reconned.

Electrode coordinate re-save. Spencer confirmed that the earlier cohort required re-saving all.pom with the correct coordinate scheme, the (x, y, No.) coordinate corresponding to the res_T1 image added to Curry. Repeating this per new patient means, for each one:

1. Add res_T1 to Curry
2. Load all.pom
3. Move res_T1 into ID 1-5
4. Change the coordinate system to the (x, y, No.) matching the ID res_T1 now occupies
5. Save the electrodes as 'all_res.pom'

Spencer is reviewing what he did previously and will flag any major differences. This step is manual and per-patient, so its total cost scales directly with whatever the imaging inventory turns up, and it needs a full workstation.

Development is moving out of chat and into Claude Code.

Next: copy from the T drive, then inventory what actually landed versus what is missing, which sets the real denominator before committing to “all patients.” Answer Spencer on whether the cohort is being pooled this time. The Curry re-save stays unscheduled until the patient count is known.

SEEG-db

Aim: collate the 2025 cohort for the multi-collator SEEG database, 44 patients, due mid-August.

Assigned zero-padded sub-001 through sub-044 IDs sorted by implant date. That crosswalk was the prerequisite gating every downstream chunk, so it went first.

The work is structured as 15 explicit dated chunks of 3 patients per weekday in 1h45m blocks running from 2026-07-17 through 2026-08-06, with flagged-field resolution on 08-06, final QC and handoff on 08-07, and a hard backstop of 08-14. Explicit dated chunks rather than a recurring task, so that progress stays visible and a skipped day goes overdue rather than silently rolling forward. Roughly 51 variables per patient span demographics, implantation details, up to five ictal onset patterns, stimulation seizures, surgical details, histopathology, etiology, Engel outcome, and follow-up. Definitional ambiguities are being resolved case by case rather than against a formal codebook.

Next: chunk 1 (sub-001 to sub-003) did not start today and carries forward. PMU service runs 07-21 to 07-24, which compresses the front half of the schedule.