Skip to content

Commit 7c8846f

Browse files
committed
Fixed test in new Similarity interface
Also fixed constructor of old interface to throw the DeprecationWarning
1 parent 7f06c11 commit 7c8846f

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

nipype/algorithms/metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,7 @@ class Similarity(BaseInterface):
529529
530530
Example
531531
-------
532-
>>> from nipype.interfaces.nipy.utils import Similarity
532+
>>> from nipype.algorithms.metrics import Similarity
533533
>>> similarity = Similarity()
534534
>>> similarity.inputs.volume1 = 'rc1s1.nii'
535535
>>> similarity.inputs.volume2 = 'rc1s2.nii'

nipype/interfaces/nipy/utils.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727

2828
class SimilarityInputSpec(BaseInterfaceInputSpec):
29-
3029
volume1 = File(exists=True, desc="3D volume", mandatory=True)
3130
volume2 = File(exists=True, desc="3D volume", mandatory=True)
3231
mask1 = File(exists=True, desc="3D volume")
@@ -44,7 +43,6 @@ class SimilarityInputSpec(BaseInterfaceInputSpec):
4443

4544

4645
class SimilarityOutputSpec(TraitedSpec):
47-
4846
similarity = traits.Float(desc="Similarity between volume 1 and 2")
4947

5048

@@ -72,7 +70,7 @@ def __init__(self, **inputs):
7270
warnings.warn(("This interface is deprecated since 0.10.0."
7371
" Please use nipype.algorithms.metrics.Similarity"),
7472
DeprecationWarning)
75-
super(BaseInterface,self).__init__(**inputs)
73+
super(Similarity,self).__init__(**inputs)
7674

7775
def _run_interface(self, runtime):
7876

0 commit comments

Comments
 (0)