ants.WarpImageMultiTransform()has two mandatory inputs:
transformation_series. The first should an image (e.g., a structural or a functional) and the second a list of files representing the transformation files.
transformation_seriesand I'm using it to apply some transformations that I already have obtained from the generation of an ants template to a functional image. The problem is that to transform correctly the image I have to provide two inputs in the
transformation_seriesinput (an affine and a warp) but when I provide a list as input the workflow won't run because of the error mentioned earlier
Hello! I have a question regarding nipype - I found the c3d wrapper to be missing lots of functions such as thresholding: https://nipype.readthedocs.io/en/latest/interfaces/generated/nipype.interfaces.c3.html
Is there any way I can access all c3d functions from the nipype module? If not are there any plans to add this? Thank you!
error: ----> preproc.connect(getthresh, ('out_stat', getthreshop), threshold, 'op_string')
NameError: name 'threshold' is not defined
could you please help me out to fix the issue.
I'm working on skull stripping of brain MRI dicom images.
The following program :
from nipype.interfaces import fsl
from nilearn.plotting import plot_anat
import numpy as np
import matplotlib.pyplot as plt
def bet(in_file, frac = 0.40, robust = True):
skullstrip = fsl.BET()
in_file = in_file
skullstrip.inputs.in_file = os.path.abspath(in_file)
skullstrip.inputs.out_file = os.path.abspath(
skullstrip.inputs.frac = frac
skullstrip.inputs.robust = robust
anat_head = 'flair.nii.gz'
fracs = np.arange(0.3,0.75,0.05)
for frac in fracs:
skullstrip = bet(anat_head,frac = round(frac,2),)
getting following error :
Traceback (most recent call last):
File "fsl_bet.py", line 61, in <module>
File "/anaconda3/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 397, in run
runtime = self._run_interface(runtime)
File "/anaconda3/lib/python3.7/site-packages/nipype/interfaces/fsl/preprocess.py", line 162, in _run_interface
runtime = super(BET, self)._run_interface(runtime)
File "/anaconda3/lib/python3.7/site-packages/nipype/interfaces/base/core.py", line 781, in _run_interface
% (executable_name, runtime.hostname)
OSError: No command "bet" found on host divya-HP-ProBook-440-G3. Please check that the corresponding package is installed.
which betin the terminal that you are running the code in.
A) FSL installation is must even if we use nipype.interface for brain extration. FSL Installation link -> https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/FslInstallation.
B) Add the following to ~/.bashrc file
export FSLDIR PATH
C) After complete installation restart the system.
Step 2: Check the installation :
A) Type FSL and press enter (BET tool (GUI)pops out).
B) In command prompt , type bet inputfilename.nii.gz outfilename
If it work well, then we can use nipype.interface program for multiple slice brain extraction .