nipype.interfaces.dipy.base module

Base interfaces for dipy

DipyBaseInterface

Link to code

Bases: LibraryBaseInterface

A base interface for py:mod:dipy computations.

DipyDiffusionInterface

Link to code

Bases: DipyBaseInterface

A base interface for py:mod:dipy computations.

in_bvala pathlike object or string representing an existing file

Input b-values table.

in_bveca pathlike object or string representing an existing file

Input b-vectors table.

in_filea pathlike object or string representing an existing file

Input diffusion data.

b0_thresan integer

B0 threshold. (Nipype default value: 700)

out_prefixa string

Output prefix for file names.

nipype.interfaces.dipy.base.convert_to_traits_type(dipy_type, is_file=False)

Convert DIPY type to Traits type.

nipype.interfaces.dipy.base.create_interface_specs(class_name, params=None, BaseClass=<class 'nipype.interfaces.base.specs.TraitedSpec'>)

Create IN/Out interface specifications dynamically.

Parameters:
  • class_name (str) – The future class name(e.g, (MyClassInSpec))

  • params (list of tuple) – dipy argument list

  • BaseClass (TraitedSpec object) – parent class

Returns:

newclass – new nipype interface specification class

Return type:

object

nipype.interfaces.dipy.base.dipy_to_nipype_interface(cls_name, dipy_flow, BaseClass=<class 'nipype.interfaces.dipy.base.DipyBaseInterface'>)

Construct a class in order to respect nipype interface specifications.

This convenient class factory convert a DIPY Workflow to a nipype interface.

Parameters:
  • cls_name (string) – new class name

  • dipy_flow (Workflow class type.) – It should be any children class of dipy.workflows.workflow.Worflow

  • BaseClass (object) – nipype instance object

Returns:

newclass – new nipype interface specification class

Return type:

object

nipype.interfaces.dipy.base.dipy_version()

Check dipy version.

nipype.interfaces.dipy.base.get_default_args(func)

Return optional arguments of a function.

Parameters:

func (callable) –

Return type:

dict

nipype.interfaces.dipy.base.get_dipy_workflows(module)

Search for DIPY workflow class.

Parameters:

module (object) – module object

Returns:

l_wkflw – This a list of tuple containing 2 elements: Workflow name, Workflow class obj

Return type:

list of tuple

Examples

>>> from dipy.workflows import align  
>>> get_dipy_workflows(align)  
nipype.interfaces.dipy.base.no_dipy()

Check if dipy is available.