Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 23 18:45
  • Feb 22 02:44
    satra commented #3301
  • Feb 21 10:23
    a3sha2 synchronize #3306
  • Feb 21 09:55
    a3sha2 edited #3306
  • Feb 21 09:55
    a3sha2 opened #3306
  • Feb 19 14:37
    effigies commented #3305
  • Feb 19 06:44
    Chercas edited #3305
  • Feb 19 06:44
    Chercas opened #3305
  • Feb 18 11:29
    htrier opened #3304
  • Feb 17 18:58
    JohannesWiesner commented #3303
  • Feb 17 17:10
    JohannesWiesner opened #3303
  • Feb 16 20:43
    yarikoptic commented #3294
  • Feb 16 19:56
    carolfs commented #2870
  • Feb 16 16:59
    Gresliebear edited #3302
  • Feb 16 16:58
    Gresliebear edited #3302
  • Feb 16 16:56
    Gresliebear opened #3302
  • Feb 14 18:05
    JohannesWiesner commented #3301
  • Feb 13 17:33
    satra commented #2957
  • Feb 13 17:18
    satra commented #3301
sneha-dg
@sneha-dg
Hi, How do you write the following command line code in nipype? %%bash
fslnvols /data/sub-01/func/sub-01_task-obj_bold.nii.gz
Abel González
@abelalez
@sneha-dg I'm not sure if there is a Nipype function of fslnvols. But, you can use the package NiBabel to know the dimensions of your image.
import nibabel
img = nibabel.load("your_image.nii")
img.shape
Mohit Saxena
@mohitindelhi_gitlab
HI how does one use fsleyes through nipype? Is there any other interface to view th eouputs of?
sneha-dg
@sneha-dg
@abelalez this worked! Thanks a lot
Peer Herholz
@PeerHerholz
@mohitindelhi_gitlab, as already pointed out by @effigies such questions are great for neurostars.org (as more people will be able to help and benefit from it) and FSLeyes is not part of nipype. I would suggest you look into nibabel and nilearn. Especially the latter provides an amazing and divers functionality to plot all sorts of brain imaging data
matrixbot
@matrixbot
Chris Gorgolewski This looks like an interesting model for nipype: https://nf-co.re/ Satrajit Ghosh (Gitter)
fabioboh
@fabioboh
dear all,
I would like to use the spm.FieldMap interface in nipype to correct some fMRI epi images for inhomogeneities in the magnetic field
I guess I can run FieldMap, first setting jobtype calculatevdm
then applyvdm
however from the documentation it is not so clear to me this would work as as output only a vdm file is given
fabioboh
@fabioboh
should not tthere be also an unwarped epi image?
Horea Christian
@TheChymera
hi guys, how can I signal that an attribute of an inputspec will require another one to be present?
matrixbot
@matrixbot
Chris Markiewicz Requires
Kuang-Han Huang
@kuanghan
Hi everyone, thanks a lot for the hard work! One question about the SPM interface's slice timing parameter (nipype.interfaces.spm.SliceTiming): documentation says the parameter for the reference slice ref_slice needs to be of type int, but then it says it could be a 1-based index or a reference time point in msec (which would be a float). Right now, it throws an error when I try to use a time point for ref_slice, which would be a float (because I'm using TR/2). Maybe the input type for ref_slice should be changed? SPM12 takes either an integer or float, so ideally nipype should take either an integer or float as well. Thanks!!
fabioboh
@fabioboh
ok I will try to add the applyvdm functionality to the fieldmap interface
Victor Férat
@vferat
Hi everyone, I would like to wrap a python function with an input that can be Either a list or a Str, and i would like to set a default value. But when i call method.default_values, the console returns undefined
There is my code sample:
My_input = traits.Either(traits.ListStr(('a', 'b'),usedefault=True), traits.Str(), desc='''description''', mandatory=False, usedefault=True)
In tthis exemple, i would like to have the list ("a","b) as default value
Thanks for you help and for all the work you are doing on nipype !
Victor Férat
@vferat
Found the soluton, I can set-up the default avalue using "default="
Seems pretty obvious..
andrewcyung
@andrewcyung
Hi there, forgive me if this is the wrong place to ask this - I am having trouble using a Slicer interface (from nipype.interfaces.slicer.registration.brainsresample.BRAINSResample) because the workflow is not detecting the command. I do realize that BRAINSResample is a Slicer module, and can call it on the command line by going to the Slicer install directory and typing "./Slicer --launch BRAINSResample". I suspect that there is a problem with the visibility of the BRAINSresample module. Is it fair to say that if I can type "BRAINSResample" in a terminal window in any directory, then nipype should be able to call it? Note that I do have the Slicer path defined in the PATH environment variable in my ~.bashrc file - but I'm not sure if my python installation sees this environment variable?
Casa Mofoekeng 'Moso
@CasaMofoekengMo_twitter
@CasaMofoekengMo_twitter
Hello, I am trying to implement Python code when given the names and GPS positions of 750 people (latitude, longitude, and elevation) to find the names of the 10 closest neighbors of a randomly selected individual.
please help.
kenneth dombrowski
@kennethd
hello, i have a project which depends on numpy<=1.14.3, as well as fitz, which depends on nipype, pip attempts to install nipype 1.2.1, which then errors out with error: numpy 1.14.3 is installed but numpy>=1.15.3 is required by {'nipype'} which is strange because i see in the nipype requirements.txt depends on numpy>=1.9.0, so i wonder if it is something about your travis environment causing the egg to require a later version? if i examine the EGG_INFO in my site-packages, it does indeed depend on 1.15.3:
/opt/docker/ocrolus-core # grep numpy /usr/lib/python3.7/site-packages/nipype-1.2.1-py3.7.egg/EGG-INFO/requires.txt
numpy>=1.15.3
Chris Markiewicz
@effigies
Numpy had an issue that only exhibited in Python 3.7, which was fixed in 1.15.3: https://www.opensourceanswers.com/blog/you-shouldnt-use-python-37-for-data-science-right-now.html
If you need an earlier numpy, you should probably revert to Python 3.6.
kenneth dombrowski
@kennethd
@effigies thanks, it built with nipype<=1.2.0, i will check out the link though
kenneth dombrowski
@kennethd
@effigies the 3.7 on our alpine images don't display any of those errors, btw
Chris Markiewicz
@effigies
It looks like that constraint has been in place since 1.1.8 (nipy/nipype@2bd4fc2), so I don't know what would be new.
Julio Cesar de Azeredo
@jcazeredo

Is it good to use Nipype for non-neuroimaging applications? I think Nipype amazing and so simple for creating pipelines and workflows, is there a similar library for this that is for general use and provide functionalities like creating workflows and nodes? Or can I use Nipype to create workflows with my own Python's functions?

Thank you

Chris Markiewicz
@effigies
Yup, the core of nipype isn't really neuroimaging specific. Most of nipype.algorithms and nipype.interfaces will be neuroimaging-related, but even there you have things like nipype.interfaces.base, nipype.interfaces.io, and nipype.interfaces.utility that are pretty generic.
Julio Cesar de Azeredo
@jcazeredo
@effigies Even using my own functions as nodes, can Nipype parallelize my workflow (if nodes are not dependent)?
Chris Markiewicz
@effigies
Yes. To be clear, you'll want to use the Function interface to wrap your functions (or check out the SimpleInterface interface to make a fully-fledged interface that is pretty low-boilerplate), but yes, most Python functions can be sensibly turned into Nipype interfaces.
Julio Cesar de Azeredo
@jcazeredo
@effigies That's nice, thank you!
Sin Kim
@AKSoo
is buildtemplateparallel interface in ants.legacy because nipype.workflows.smri.ants.antsRegistrationBuildTemplate replaces it?
Sin Kim
@AKSoo
nvm, got my answer. buildtemplateparallel.sh is in https://github.com/ANTsX/ANTs/wiki/Deprecated-ANTs-programs
I am still curious how closely antsRegistrationBuildTemplate follows buildtemplateparallel.sh
Sam Berry
@Sam_CBerry_twitter
Hello
I want to compute the Dice similarity between two images, I have been to this page : https://nipype.readthedocs.io/en/latest/interfaces/generated/nipype.algorithms.metrics.html
but when I click on the 'link to code' it seems like it is importing libraries from a local directory (from .. import). Is this the case? How could I get this to work on my own computer? Apologies if I am missing something obvious :)
matrixbot
@matrixbot
Chris Markiewicz pip install nipype, and then, from nipype.algorithms.metrics import <interface>
Sam Berry
@Sam_CBerry_twitter
Ah I see, that worked thank you very much
leonardo-oz
@leonardo-oz
Hello. In fsl terminal, I can run 'bet t1.nii.gz out -m -A2 t2.nii.gz' for surface creation with both T1 and T2, How could I write the similar code in nipype? Thanks.
nstepanovs412
@nstepanovs412
emiel8
@emiel8
Hello. I want to use the nipype.interfaces.ants for my master thesis because the ANTs toolbox has a lot of very good functions for MR brain images. However I was wondering what is necessary to be installed on the computer to use this nipype.interfaces.ants command. I looked for it myself but I am not an expert in this kind of stuff. The computers in school are on Mac OS and I need some good explanation before I am allowed to install something on them. I found this (https://github.com/ANTsX/ANTs/wiki/Compiling-ANTs-on-Linux-and-Mac-OS) page about compiling ANTs on Mac OS. Would this be enough to call ants functions through nipype in python ? My excuses if I don't see the obvious here, but I am not that familiar with this kind of stuff. Thanks in advance
matrixbot
@matrixbot

Chris Markiewicz > <@gitter_emiel8:matrix.org> Hello. I want to use the nipype.interfaces.ants for my master thesis because the ANTs toolbox has a lot of very good functions for MR brain images. However I was wondering what is necessary to be installed on the computer to use this nipype.interfaces.ants command. I looked for it myself but I am not an expert in this kind of stuff. The computers in school are on Mac OS and I need some good explanation before I am allowed to install something on them. I found this (https://github.com/ANTsX/ANTs/wiki/Compiling-ANTs-on-Linux-and-Mac-OS) page about compiling ANTs on Mac OS. Would this be enough to call ants functions through nipype in python ? My excuses if I don't see the obvious here, but I am not that familiar with this kind of stuff. Thanks in advance

Yes, if you have ANTs installed and can call the programs from the command line, then nipype should be able to call them as well.

Chris Markiewicz > <@gitter_leonardo-oz:matrix.org> Hello. In fsl terminal, I can run 'bet t1.nii.gz out -m -A2 t2.nii.gz' for surface creation with both T1 and T2, How could I write the similar code in nipype? Thanks.

Looks like t1.nii.gz would be the in_file, mask=True would provide -m, and t2_guided='t2.nii.gz' would provide -A2 t2.nii.gz. See https://nipype.readthedocs.io/en/latest/interfaces/generated/interfaces.fsl/preprocess.html#bet.

Chris Markiewicz > <@gitter_nstepanovs412:matrix.org> http://www.fmrib.ox.ac.uk/fslcourse/fsl_course_data2.tar.gz It does not work

Could you please open an issue with where we link to that and an updated link, if you know it? If you can't find one, you can ask on the FSL mailing list where that data can now be found.

Peer Herholz
@PeerHerholz
@emiel8, regarding installing nipype and the software it provides interfaces to, you can also have a look here . Installation instructions are for Ubuntu, but work well with Mac OS as well (just change the corresponding installation files). Re ANTs: I usually just download the latest release and add the paths to the .bashrc/.bash_profile. So far I did not need to compile it on Mac OS. That being said: newer versions (looking at you catalina) might create problems. If you want to use computers at your school the mentioned .bash thingies might be hurdle given the most likely centralized IT. based on that docker/singularity might also be out as options. let me/us know how things proceed.
emiel8
@emiel8
@PeerHerholz thank you a lot, I am going to try it ASAP this coming week and will let you know!
Grace Shearrer
@grace-shearrer
Yo! Does anyone have experience wrapping a MATLAB script in nipype? I am trying to wrap an old FSLNETS script
Tashrif Billah
@tashrifbillah
Hi, is there a documentation that explains the content of each output file from a nipype workflow?
Please see nipy/nipype#3091 for details.