Closed lrq3000 closed 3 years ago
Dear all, I'd also need the CAT12 module - has this already been started somewhere - if not could someone please guide me on how to do this?
Hi @barbrakr, I think the Create interfaces tutorial is a good place to start. I would suggest writing your interface independently, i.e. in a new file:
from nipype.interfaces.base import TraitedSpec
from nipype.interfaces.spm.base import SPMCommandInputSpec, SPMCommand
class Cat12InputSpec(SPMCommandInputSpec):
...
class Cat12OutputSpec(TraitedSpec):
...
class Cat12(SPMCommand):
...
# Simple test
if __name__ == '__main__':
cat12 = Cat12()
# Add some inputs that you know should work, here.
cat12.inputs.in_file = ...
...
cat12.run()
Then you can easily test it just by running python cat12.py
.
I would suggest browsing the nipype.interfaces.spm directory to get a sense of how other commands are wrapped. In fact, it might be easiest to find an interface that is very similar to what you want to write, copying it and swapping out names that are specific to the old command for analogous names with the new command.
When you're ready for feedback, choose a module in nipype.interfaces.spm
to add it to, and open a pull request. Sometimes it's easiest to ask questions with some code for context, so feel free to do this at whatever stage of readiness.
GitHub is really awesome - thank you so much @effigies for your detailed expert description - I'll get crunching on this!
Hey @barbrakr and @lrq3000, just wanted to ask if you have already started on writing an interface for CAT12? I just had a Q&A with Peer Herholz on Neurostars, which might be interesting for you?
Hi @JohannesWiesner - no, sorry I actually never got round to writing this - although I am sure that people within the community would find it quite useful!
Idem for me unfortunately.
Le lun. 5 oct. 2020 à 18:01, barbrakr notifications@github.com a écrit :
Hi @JohannesWiesner https://github.com/JohannesWiesner - no, sorry I actually never got round to writing this - although I am sure that people within the community would find it quite useful!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nipy/nipype/issues/2783#issuecomment-703726859, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIRFXWTSSL52XFHV56EGQDSJHUUTANCNFSM4GE42RFA .
As discussed with @lrq3000 and @barbrakr, I provide two links to repositories that I created:
https://github.com/JohannesWiesner/nisupply https://github.com/JohannesWiesner/pycat
nisupply
and pycat
(which builds up on nisupply
) do not offer an interface to CAT12 itself but a least make it a little bit more easy to handle files that were produced by CAT12. The main motivation behind nisupply
was, that CAT12 and probably also other current tools produce files and directory structures that do not conform to BIDS, which again does not allow to use repos that need the files to be BIDS-conform in order to work (like nipype
). Pycat currently allows obtaining information from the .xml files (such as obtaining the TIV for each participant). It also contains a function called check_sample_homogeneity
which is supposed to imitate CAT12’s check_sample module but currently does not provided the exact logic that CAT12 has (The plan would be to exactly imitate what CAT12 is doing and to use plotly/dash to imitate the interface from CAT12).
Hi,
I already made my own CAT12 Nipype Interface following the @effigies suggestions. I will try to make a PR as soon as possible.
Hi,
I've implemented for a nipype-based project I'm working on, the CAT12 Spatially adaptive non-local means (SANLM) denoising filter as a nipype interface.
The code is already written, so I try to submit a PR as well
Would it be possible to add CAT12 toolbox for SPM12 support? Currently, it seems only VBM8 is supported?