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

SyN SDC incomplete #393

Open
mgxd opened this issue Sep 10, 2024 · 1 comment
Open

SyN SDC incomplete #393

mgxd opened this issue Sep 10, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@mgxd
Copy link
Collaborator

mgxd commented Sep 10, 2024

What happened?

When running the SyN portion of the pipeline:

nipype.pipeline.engine.nodes.NodeExecutionError: Exception raised while executing Node fmap_select_std.

Traceback:
	Traceback (most recent call last):
	  File "/opt/conda/envs/nibabies/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 400, in run
	    outputs = self.aggregate_outputs(runtime)
	              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	  File "/opt/conda/envs/nibabies/lib/python3.11/site-packages/nipype/interfaces/base/core.py", line 429, in aggregate_outputs
	    predicted_outputs = self._list_outputs()  # Predictions from _list_outputs
	                        ^^^^^^^^^^^^^^^^^^^^
	  File "/opt/conda/envs/nibabies/lib/python3.11/site-packages/niworkflows/interfaces/utility.py", line 217, in _list_outputs
	    index = self.inputs.keys.index(self.inputs.key)
	            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
	ValueError: 'MNI152NLin2009cAsym' is not in list

The offending section:

fmap_select_std = pe.Node(
KeySelect(fields=['std2anat_xfm'], key='MNI152NLin2009cAsym'),
name='fmap_select_std',
run_without_submitting=True,
)
if any(estimator.method == fm.EstimatorType.ANAT for estimator in fmap_estimators):
workflow.connect([
(anat_fit_wf, fmap_select_std, [
('outputnode.std2anat_xfm', 'std2anat_xfm'),
('outputnode.template', 'keys')]),
]) # fmt:skip

SDCFlows is hardcoded to using an atlas -> MNI152NLin2009cAsym transform
https://github.com/nipreps/sdcflows/blob/08e198f1f62422d2d6274ed93a3b4ba7a78d661a/sdcflows/workflows/fit/syn.py#L441-L459

The easiest solution is probably supplement this with an MNIInfant -> MNI152 transform (originally discussed in #153), but curious to hear other input (cc @oesteban @effigies)

What command did you use?

nibabies /data /out participant --participant-label 216075 --omp-nthreads 4 --mem 14000 --nprocs 4 --notrack -vv --project-goodvoxels --copy-derivatives --stop-on-first-crash --use-syn-sdc --force-syn --ignore fieldmaps --level full --surface-recon-method mcribs --cifti-output -s V02 --fs-subjects-dir /opt/subjects --derivatives anat=/deriv/anat -w /scratch

What version of NiBabies are you using?

24.0.1

Relevant log output

No response

Add any additional information or context about the problem here.

No response

@mgxd mgxd added the bug Something isn't working label Sep 10, 2024
@mgxd
Copy link
Collaborator Author

mgxd commented Oct 1, 2024

The problem lies within sdcflow's init_syn_preprocessing_wf using an adult B0 image as a prior, and warping it to MNI152NLin2009cAsym. For infants, a few ideas, from easier to harder

  • Drop using the prior for SyN regularization
  • Use an infant B0 as prior, and modify workflow to use MNIInfant space

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

1 participant