Skip to content

Commit 1fde8bb

Browse files
committed
Fixes #933
1 parent 21d8634 commit 1fde8bb

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

nipype/interfaces/dipy/preprocess.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
3-
# @Author: oesteban
4-
# @Date: 2014-09-01 10:33:35
5-
# @Last Modified by: oesteban
6-
# @Last Modified time: 2014-09-03 15:07:46
3+
"""Change directory to provide relative paths for doctests
4+
>>> import os
5+
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
6+
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
7+
>>> os.chdir(datadir)
8+
"""
9+
710
from nipype.interfaces.base import (traits, TraitedSpec, BaseInterface,
811
File, isdefined)
912
from nipype.utils.filemanip import split_filename
@@ -23,6 +26,12 @@
2326
else:
2427
from dipy.align.aniso2iso import resample
2528
from dipy.core.gradients import GradientTable
29+
30+
try:
31+
package_check('dipy', version='0.7.2')
32+
except Exception, e:
33+
have_dipy = False
34+
else:
2635
from dipy.denoise.nlmeans import nlmeans
2736

2837

nipype/interfaces/dipy/tracks.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
# -*- coding: utf-8 -*-
2+
"""Change directory to provide relative paths for doctests
3+
>>> import os
4+
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
5+
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
6+
>>> os.chdir(datadir)
7+
"""
28
from nipype.interfaces.base import (TraitedSpec, BaseInterface, BaseInterfaceInputSpec,
39
File, isdefined, traits)
410
from nipype.utils.filemanip import split_filename

0 commit comments

Comments
 (0)