Skip to content

Partial revert of imoports in nipype namespace #843

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

Merged
merged 2 commits into from
May 17, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Next Release
============

* API: Interfaces to external packages are no longer available in the top-level ``nipype`` namespace, and must be imported directly (e.g. ``from nipype.interfaces import fsl``).
* ENH: New ANTs interface: ApplyTransformsToPoints
* FIX: MRTrix tracking algorithms were ignoring mask parameters.

Expand Down
2 changes: 1 addition & 1 deletion doc/users/spmmcr.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ the following commands are executed at the beginning of your script:

.. testcode::

from nipype import spm
from nipype.interfaces import spm
matlab_cmd = '/path/to/run_spm8.sh /path/to/Compiler_Runtime/v713/ script'
spm.SPMCommand.set_mlab_paths(matlab_cmd=matlab_cmd, use_mcr=True)

Expand Down
2 changes: 1 addition & 1 deletion examples/fmri_spm.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
from nipype import config
config.enable_provenance()

from nipype import spm, fsl
from nipype.interfaces import spm, fsl

# In order to use this example with SPM's matlab common runtime
# matlab_cmd = ('/Users/satra/Downloads/spm8/run_spm8.sh '
Expand Down
3 changes: 1 addition & 2 deletions nipype/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,5 @@ def _test_local_install():


from pipeline import Node, MapNode, JoinNode, Workflow
from interfaces import (fsl, spm, freesurfer, afni, ants, slicer, dipy, nipy,
mrtrix, camino, DataGrabber, DataSink, SelectFiles,
from interfaces import (DataGrabber, DataSink, SelectFiles,
IdentityInterface, Rename, Function, Select, Merge)
1 change: 0 additions & 1 deletion nipype/interfaces/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@

from io import DataGrabber, DataSink, SelectFiles
from utility import IdentityInterface, Rename, Function, Select, Merge
import fsl, spm, freesurfer, afni, ants, slicer, dipy, nipy, mrtrix, camino
2 changes: 1 addition & 1 deletion nipype/interfaces/fsl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ class ImageMaths(FSLCommand):
Examples
--------

>>> from nipype import fsl
>>> from nipype.interfaces import fsl
>>> from nipype.testing import anatfile
>>> maths = fsl.ImageMaths(in_file=anatfile, op_string= '-add 5',
... out_file='foo_maths.nii')
Expand Down
2 changes: 1 addition & 1 deletion nipype/interfaces/spm/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
In order to use the standalone MCR version of spm, you need to ensure that
the following commands are executed at the beginning of your script::

from nipype import spm
from nipype.interfaces import spm
matlab_cmd = '/path/to/run_spm8.sh /path/to/Compiler_Runtime/v713/ script'
spm.SPMCommand.set_mlab_paths(matlab_cmd=matlab_cmd, use_mcr=True)

Expand Down
6 changes: 4 additions & 2 deletions nipype/pipeline/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1099,7 +1099,8 @@ class Node(WorkflowBase):
Examples
--------

>>> from nipype import Node, spm
>>> from nipype import Node
>>> from nipype.interfaces import spm
>>> realign = Node(spm.Realign(), 'realign')
>>> realign.inputs.in_files = 'functional.nii'
>>> realign.inputs.register_to_mean = True
Expand Down Expand Up @@ -1984,7 +1985,8 @@ class MapNode(Node):
Examples
--------

>>> from nipype import MapNode, fsl
>>> from nipype import MapNode
>>> from nipype.interfaces import fsl
>>> realign = MapNode(fsl.MCFLIRT(), 'in_file', 'realign')
>>> realign.inputs.in_file = ['functional.nii',
... 'functional2.nii',
Expand Down