Skip to content

coregistration / alignment off? [EEG data] #1257

Description

@SophieHerbst

Hello!

I am processing an EEG dataset using the pipeline (version: latest main), with dig points + individual MRIs.
I did manual coregistration and subsequently updated the anatomical landmarks in my T1-json files:

# compute the new landmarks using the transformation
mri_landmarks = mne_bids.get_anat_landmarks(
            image=bids_path_t1,
            info=info,
            trans=trans,
            fs_subject=subject_fs,
            fs_subjects_dir=subjects_dir)

print(mri_landmarks.dig)
# [<DigPoint |        LPA : (14.9, 144.1, 110.8)      : MRI voxel frame>, <DigPoint |     Nasion : (93.7, 249.4, 161.0)      : MRI voxel frame>, <DigPoint  |        RPA : (179.8, 147.0, 117.0)     : MRI voxel frame>]

# Update landmarks for existing file
 mne_bids.update_anat_landmarks(
            bids_path=bids_path_t1,
            landmarks=mri_landmarks,
            on_missing="ignore")

# Plot (I played with the parameters)
fig = plot_alignment(
            info,
            trans,
            subject=subject_fs,
            dig=True,
            eeg=["original", "projected"],
            meg=[],
            coord_frame="auto",
            subjects_dir=subjects_dir,
            show_channel_names=True,
        )

From the json file: sub-PC009_ses-01_run-1_T1w.json
"AnatomicalLandmarkCoordinates": {
"LPA": [
14.94783071409175,
144.09823694342606,
110.7827822744363
],
"NAS": [
93.72576660795733,
249.35544621088334,
161.04340943202396
],
"RPA": [
179.78230137925442,
147.03877621527408,
117.03505161340044
]
}

From the trans-file:
<Transform | MRI (surface RAS)->head>
[[ 0.99954885 0.03000787 0.00128422 -0.00128606]
[-0.02784465 0.90976769 0.41418278 -0.01740106]
[ 0.0112604 -0.41403168 0.91019285 0.02344617]
[ 0. 0. 0. 1. ]]

Yet in the report, as well as a manually created alignment plot the dig-points and fiducials look off.
Also, this output worries me:
Average distance from 62 digitized points to head: 19.34 mm

Any idea what to check? Thanks in advance!

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions