Skip to content

Commit

Permalink
Fix keyword arg error in example1.py. Misc code cleanup.
Browse files Browse the repository at this point in the history
git-svn-id: https://nipy.svn.sourceforge.net/svnroot/nipy/nipype/tags/0.1@538 ead46cd0-7350-4e37-8683-fc4c6f79bf00
  • Loading branch information
Christopher Burns committed Oct 6, 2009
1 parent 8ddf6f7 commit 580ff00
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions doc/examples/example1.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
import nipype.pipeline.engine as pe
import os

reload(pe)
reload(nw)
reload(spm)

# interface example
realign1 = spm.Realign()
realign1.inputs.infile = os.path.abspath('data/funcrun.nii')
Expand All @@ -16,21 +12,26 @@


# node_wrapper example
realign2 = nw.NodeWrapper(interface=spm.Realign(),output_directory='test2',diskbased=True)
realign2 = nw.NodeWrapper(interface=spm.Realign(),
base_directory='test2',
diskbased=True)
realign2.inputs.infile = os.path.abspath('data/funcrun.nii')
realign2.inputs.register_to_mean = True
#results2 = realign2.run()


# pipeline example
realign3 = nw.NodeWrapper(interface=spm.Realign(),diskbased=True)
realign3 = nw.NodeWrapper(interface=spm.Realign(), diskbased=True)
realign3.inputs.infile = os.path.abspath('data/funcrun.nii')
realign3.inputs.register_to_mean = True

coregister = nw.NodeWrapper(interface=spm.Coregister(),diskbased=True)
coregister = nw.NodeWrapper(interface=spm.Coregister(), diskbased=True)
coregister.inputs.target = os.path.abspath('data/struct.nii')

pipeline = pe.Pipeline()
pipeline.config['workdir'] = os.path.abspath('test3')
pipeline.connect([(realign3,coregister,[('mean_image','source'),('realigned_files','apply_to_files')])])
pipeline.connect([(realign3, coregister,
[('mean_image', 'source'),
('realigned_files', 'apply_to_files')]
)])
#pipeline.run()

0 comments on commit 580ff00

Please sign in to comment.