Skip to content

init_3dQwarp_wf expects input that is missing from inputnode #441

@psadil

Description

@psadil

What happened?

I was attempting to configure a workflow with init_3dQwarp_wf but was unable to get it to run. As I understand it, this may be an issue with the workflow expecting inputnode to provide in_reference

(inputnode, unwarp_reference, [("in_reference", "reference_image"),
("in_reference", "input_image")]),

but also that inputnode is not looking for in_reference

inputnode = pe.Node(
niu.IdentityInterface(fields=["in_data", "metadata"]), name="inputnode"
)

What command did you use?

from pathlib import Path

from sdcflows.workflows.fit import pepolar

afni_wf = pepolar.init_3dQwarp_wf(omp_nthreads=1, name="qwarp")
afni_wf.base_dir = Path.cwd()
afni_wf.inputs.inputnode.in_data = [
    "sub-travel2_dir-AP_epi.nii.gz",
    "sub-travel2_dir-PA_epi.nii.gz",
]

afni_wf.inputs.inputnode.metadata = [
    {"PhaseEncodingDirection": "j-"},
    {"PhaseEncodingDirection": "j"},
]

afni_wf.run()

# now try adding in_reference
afni_wf.inputs.inputnode.in_reference = "sub-travel2_dir-AP_epi.nii.gz"

What version of the software are you running?

2.8.1

How are you running this software?

Local installation ("bare-metal")

Is your data BIDS valid?

Yes

Are you reusing any previously computed results?

No

Please copy and paste any relevant log output.

First attempt at running

AttributeError: 'DynamicTraitedSpec' object has no attribute 'in_reference'

Attempt at adding in_reference

AttributeError: 'NoneType' object has no attribute 'set_input'


### Additional information / screenshots

_No response_

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions