-
Notifications
You must be signed in to change notification settings - Fork 301
[RTM] ENH: Register FreeSurfer template to FMRIPREP template #733
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
Conversation
70510d2
to
b7376f0
Compare
Addressing this approach to BEP 014, I believe what we'll want is:
In which case, we want the inverse of what I'm currently generating, which is easily constructed with lta_convert --inlta transform.lta --outitk transform.txt --invert I think the most appropriate alternative would be to add a transform to the |
f4a03f3
to
db69910
Compare
a57b762
to
155812c
Compare
5476457
to
4f22e86
Compare
To review this PR, separately review #741, and then look at effigies/fmriprep@fsfix_common...fix/freesurfer_register. |
2c74d20
to
0a3adce
Compare
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.
Everything seems reasonable, with the constraints of my limited knowledge about surfaces in freesurfer.
.circle/data/ds005_outputs.txt
Outdated
@@ -24,6 +24,7 @@ ds005/out/fmriprep/sub-01/anat/sub-01_T1w_space-MNI152NLin2009cAsym_class-WM_pro | |||
ds005/out/fmriprep/sub-01/anat/sub-01_T1w_space-MNI152NLin2009cAsym_dtissue.nii.gz | |||
ds005/out/fmriprep/sub-01/anat/sub-01_T1w_space-MNI152NLin2009cAsym_preproc.nii.gz | |||
ds005/out/fmriprep/sub-01/anat/sub-01_T1w_space-MNI152NLin2009cAsym_warp.h5 | |||
ds005/out/fmriprep/sub-01/anat/sub-01_T1w_target-fsnative_affine.txt |
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 thought the filename was sub-01_T1w_preproc_target-fsnative_affine.txt
(missing _preproc
)
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 did change it to make it more like ds005/out/fmriprep/sub-01/anat/sub-01_T1w_space-MNI152NLin2009cAsym_warp.h5
, which is a transform from T1w
space to MNI152NLin2009cAsym
. Speaking of which, @chrisfilo, reading the BEP, should that be a target-MNI...
instead of space-MNI...
?
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.
Correct.
@@ -218,3 +224,20 @@ def normalize_surfs(in_file): | |||
pointset.meta.data.insert(2, geom_type) | |||
img.to_filename(fname) | |||
return os.path.abspath(fname) | |||
|
|||
|
|||
def load_transform(fname): |
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.
a minimal docstring here?
47fa78a
to
0b153ec
Compare
0b153ec
to
9ed6a6e
Compare
Addresses issue raised in #726 (comment).
Given this, I think we should output the registration transform, to give users the tools to move between FMRIPREP and FreeSurfer spaces. I'd recommend the LTA format, since that has more metadata about the source and target spaces; if users need to convert to other formats, they will presumably have access to the
LTAConvert
tool.To do: