Skip to content

TraitError: The 'luts' trait of a PicoPDFsInputSpec instance must be a list of from 1 to 3 items which are an existing file name, but a value of '/_subject_id_subj1/dtlutgen/bvecs.dat' <type 'str'> was specified. #726

@robbert-harms

Description

@robbert-harms

When trying to run the demo "dmri_camino_dti.py" I encountered the following problem with the PicoPDFsInputSpec:

TraitError: The 'luts' trait of a PicoPDFsInputSpec instance must be a list of from 1 to 3 items which are an existing file name, but a value of '/_subject_id_subj1/dtlutgen/bvecs.dat' <type 'str'> was specified.
Error setting node input:
Node: picopdfs
input: luts

I browsed through the source code and I believe that the error lies in these two code snippits which are incompatible:

from interfaces/camino.dti.py in class PicoPDFsInputSpec:

luts = traits.List(File(exists=True), argstr='-luts %s', ...)

and in the same file in class DTLUTGenOutputSpec

dtLUT = File(exists=True, desc='Lookup Table')

and the code in the script:

dtlutgen = pe.Node(interface=camino.DTLUTGen(), name="dtlutgen")
dtlutgen.inputs.snr = 16.0
dtlutgen.inputs.inversion = 1
...
picopdfs = pe.Node(interface=camino.PicoPDFs(), name="picopdfs")
picopdfs.inputs.inputmodel = 'dt'
...
tractography.connect([(dtlutgen, picopdfs,[("dtLUT","luts")])])

It seems that the PicoDFSs requires a list as input (with a file in it), while the dtlutgen gives a file as output.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions