Skip to content

Storing iEEG electrodes with locations from FreeSurfer image #747

@adam2392

Description

@adam2392

Summary

In #734, @sappelhoff summarized the following issue that I'm facing:

  • He has an MRI file that he wants to store in the subject-specific freesurfer space (FreeSurfer t1w.mgz file)
  • apparently, this is known as fsnative space ... and in BIDS, the appropriate keyword might be individual
  • So he could place the T1w file in derivatives, using *_space-individual_T1w.nii with an accompanying *_space-individual_T1w.json
  • However, according to the spec, that T1w.json MUST contain the SpatialReference metadata --> but what would he need to put in that field as a value?

@effigies, your answer #734 (comment) does currently not help me to understand this 🤔


Apart from that, it'd be more convenient for @adam2392 to actually store the rotated MRIs not in derivatives, but in raw ... and for that we'd need to:

  1. allow the _space- entity for MRI data also in RAW (not just in derivatives)
  2. add individual to the keywords permitted for MEG/EEG/iEEG "spaces" and "coordsystems"
  3. (still resolve / clarify how/if to use SpatialReference for this case)
  4. however, see @dorahermes's comment on this, that these "rotated" MRIs should be stored in derivatives, and not in RAW: [FIX] 1) Clarify appropriate labels for space entity, 2) Clarify channels+electrodes do not have to match #734 (comment)

@adam2392 please chime in if I misrepresented one of your points.

Originally posted by @sappelhoff in #734 (comment)

Example

As an example, I have the following dataset.

Screen Shot 2021-03-05 at 5 14 18 PM

In *coordsystem.json the contents are:

{
    "IntendedFor": "sub-la02_ses-presurgery_space-individual_proc-freesurfer_T1w.nii",
    "iEEGCoordinateSystem": "Other",
    "iEEGCoordinateUnits": "mm",
    "iEEGCoordinateSystemDescription": "FreeSurfer Coordinate System derived from the CT, or T1 MRI scan.",
}
  1. space-individual is "not allowed" currently? If it is, then I can submit a PR to bids-validator. This is the first low-hanging fruit.
  2. IntendedFor is used to map this electrode coordinate back to an anatomical image for interpretation. Since this isn't back to the raw dicom NIFTI, then per @sappelhoff 's comments above, I presume this must be mapped to a FreeSurfer T1w image stored as a "derivative". Is the space-individual there then correct? Or should it be something else to be compliant? Individual doesn't have much information in the BIDS appendix. For example, i) This coordinate system requires specifying an additional, participant-specific file to be fully defined. is not clear to me exactly and ii) the idea of a SpatialReference is not clear to me where it should go. Does it go with the image sidecar json, or *coordsystem.json, or somewhere else?

Outlook

From my perspective, rn the spec works real well if I just want coordinates in MNI/fsaverage template space, cuz then everything works out how it should with space being a standard template identifier.

When things are not standard, the question then arises, what's the correct thing to do with regards to space, IntendedFor and SpatialReference?

  • In Nonstandard Template identifiers, it says to specify a SpatialReference, which then seems... like IntendedFor?
  • And does SpatialReference go in the *coordsystem.json file then, or somewhere else?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions