Skip to content
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

Remove unused identity transform from anatomical derivatives #851

Open
tsalo opened this issue Nov 8, 2024 · 2 comments
Open

Remove unused identity transform from anatomical derivatives #851

tsalo opened this issue Nov 8, 2024 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@tsalo
Copy link
Member

tsalo commented Nov 8, 2024

Summary

The file is named sub-PNC/anat/sub-PNC_from-orig_to-T1w_mode-image_xfm.txt.

@tsalo tsalo added the bug Something isn't working label Nov 8, 2024
@tsalo
Copy link
Member Author

tsalo commented Nov 8, 2024

Here's the relevant section of code:

if num_images == 1:
def _get_first(in_list):
if isinstance(in_list, (list, tuple)):
return in_list[0]
return in_list
n4_correct = pe.Node(n4_interface, name="n4_correct", n_procs=omp_nthreads)
outputnode.inputs.template_transforms = [pkgr("qsiprep", "data/itkIdentityTransform.txt")]
workflow.connect([
(anat_conform, outputnode, [
(('out_file', _get_first), 'template')]),
(anat_conform, n4_correct, [
(('out_file', _get_first), 'input_image')]),
(n4_correct, outputnode, [('output_image', 'bias_corrected')])
]) # fmt:skip
return workflow

I think what we need is individual T1w/T2w image-to-combined T1w/T2w image transforms, which isn't really captured here.

@tsalo
Copy link
Member Author

tsalo commented Nov 11, 2024

fMRIPrep will write out orig-to-T1w transforms if there are multiple T1ws across sessions (not sure what happens where there are multiple T1ws in a single session), but it won't write them out if there's a single T1w, so we don't need to write out the identity transform.

@tsalo tsalo added this to the 1.1.0 milestone Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants
@tsalo and others