-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP; ENH] Storage of iEEG electrodes in subject-specific FreeSurfer space #757
base: master
Are you sure you want to change the base?
Conversation
@sappelhoff not sure what's up w/ the link-checker, i'll take another look today. Anything holding up this you think? |
So would the workflow for this solution be something like:
... or am I misunderstanding this? If I am correct, then we still need to figure out how to appropriately point to a derivatives file, given that they could be stored anywhere and simply using "relative paths from BIDS root" are not guaranteed to work. cc @effigies |
Yes that is correct! |
Perhaps,
? |
Is there any update with regards to this? Should I include this part, to specify that |
Thanks for the reminder, and sorry that there is so little progress - it seems like very few people are interested in solving this problem.
so am I understanding your proposal correctly?
where should that DOI be present? What about datasets that do not have a DOI? |
the proposed I think that |
|
||
- `fsnativetkr`: The subject-specific FreeSurfer T1w space. The origin of | ||
the coordinate system is at the center of isotropic 1 mm 256x256x256 | ||
volume (that is the voxel center is at slices (128, 128, 128)) in RAS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are these indices 0-offset or 1-offset?
Should the middle of a 256x256x256 volume not be represented as [127.5 127.5 127.5] (when 0-offset) or [128.5 128.5 128.5] (where 1-offset)?
The middle of a 2x2x2 volume would be at voxel [0.5 0.5 0.5] if you start counting voxels at [0 0 0], or at [1.5 1.5 1.5] when you start counting at [1 1 1].
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure it is with 0-offset.
That's what I thought initially... but I think there is some offset, so for example, running the following
mri_info --vox2ras-tkr <img>
This will generally be the 4x4 matrix for FreeSurfer output.::
[
[-1.0, 0.0, 0.0, 128.0],
[0.0, 0.0, 1.0, -128.0],
[0.0, -1.0, 0.0, 128.0],
[0.0, 0.0, 0.0, 1.0],
]
This essentially centers the coordinates at the "center" of the volume "almost".
Reference: https://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg69541.html
Then perhaps what is needed to fully define this TKR coordinate system is: "The |
@@ -151,6 +151,20 @@ Restricted keywords for the `<CoordSysType>CoordinateSystem` field in the | |||
[ACPC site](https://www.fieldtriptoolbox.org/faq/acpc/) on the FieldTrip | |||
toolbox wiki. | |||
|
|||
- `fsnative`: The subject-specific FreeSurfer T1w space. This corresponds to | |||
the original scanner image after it is re-sampled and re-scaled | |||
to an isotropic 1 mm 256x256x256 volume in RAS orientation. The origin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fsnative
is not defined relative to the 1mm 256^3 MRI, but is defined relative to the AC of the individual participant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I follow. Isn't fsnative
just the xyz coordinates in RAS space based on the vox2ras
affine transformation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RAS is only the specification of the direction of the axes, the origin also needs to be defined. That origin is at the anterior commissure, or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes you're right. I just noticed I had two incongruent sentences. Adjusted now to specify AC.
@sappelhoff is the best place to handle this within this PR? Perhaps adding a statement:
? |
although it will probably delay the efforts here, I think it's best to first deal with that issue here: #471 (comment) and then come back to the present one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, clarifying surface space would be helpful.
volume (that is the voxel center is at slices (128, 128, 128)) in RAS | ||
orientation. This corresponds to FreeSurfer's surface RAS coordinates (TKR coordinates). | ||
The origin MUST be the Anterior Commissure. The ``IntendedFor`` MUST link to an MRI that represents the 256x256x256 volume in the FreeSurfer file format. The difference between this coordinate system and ``fsnative`` is that TKR coordinates are defined on the surface of the brain based on FreeSurfer. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Freesurfer has several surfaces (pial, white, inflated... ), it is unclear which surface is meant
Closes: #747
Currently, this is a draft to demonstrate exactly what would fix issues discussed in #747 .