0

我正在做一些事情,这实际上是我的第一次,所以事情对我来说还不是很清楚,我运行了这个代码:

pip install nipype
from nipype import Node, Workflow
from nipype.interfaces.fsl import SliceTimer, MCFLIRT, Smooth

slicetimer = Node(SliceTimer(index_dir=False,
                         interleaved=True,
                         time_repetition=2.5),
              name="slicetimer")

mcflirt = Node(MCFLIRT(mean_vol=True,
                   save_plots=True),
           name="mcflirt")

smooth = Node(Smooth(fwhm=4), name="smooth")

preproc01 = Workflow(name='preproc01', base_dir="dir_path")

preproc01.connect([(slicetimer, mcflirt, [('slice_time_corrected_file', 'in_file')]),
               (mcflirt, smooth, [('out_file', 'in_file')])])

slicetimer.inputs.in_file = "file_path"

preproc01.run('MultiProc')

这是我运行最后一行代码时显示的错误:

"Could not import plugin module: nipype.pipeline.plugins"

还有一个问题:当我尝试运行此代码时:

preproc01.write_graph(graph2use='orig')

这是显示的错误消息:

'No command "dot" found on host. Please check that the corresponding package is installed.'

如果有人知道解决方案,请帮助我。顺便说一句,我从视频系列中这样做,这是链接:https ://www.youtube.com/watch?v=4FVGn8vodkc&t= 4414s Nipype 展示部分。

4

0 回答 0