nipy / nipype

Workflows and interfaces for neuroimaging packages
https://nipype.readthedocs.org/en/latest/
Other
745 stars 529 forks source link

`node.clone` has issues with setting input fields when the node is a MapNode(?) #866

Open satra opened 10 years ago

satra commented 10 years ago

just noting it here - i ran into some issues yesterday - will try to replicate the issue with code.

oesteban commented 10 years ago

I run into something very similar when I was writing the new AddCSVRow interface. In execution, clone() crashed when duplicating the interface with dynamic inputs.

satra commented 6 years ago

i think the following will recreate the bug. the interpolation for the cloned node stays at Linear

wf = Workflow('labelflow')
transformer = MapNode(ApplyTransforms(), iterfield=['input_image'], name="transformer")
transformer.inputs.reference_image = ref
transformer.inputs.transforms = T
transformer.inputs.input_image = T1s[:3]
transformer.inputs.dimension = 3
transformer.inputs.invert_transform_flags = [False, False]

transformer_nn = transformer.clone("transformer_nn")
transformer_nn.inputs.input_image = labels[:3]
transformer_nn.inputs.interpolation = 'NearestNeighbor'

@mgxd - could you please look into this when you have a chance?