Skip to content

CAT12 interface? #2783

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lrq3000 opened this issue Nov 17, 2018 · 9 comments · Fixed by #3310 or #3374
Closed

CAT12 interface? #2783

lrq3000 opened this issue Nov 17, 2018 · 9 comments · Fixed by #3310 or #3374

Comments

@lrq3000
Copy link

lrq3000 commented Nov 17, 2018

Would it be possible to add CAT12 toolbox for SPM12 support? Currently, it seems only VBM8 is supported?

@barbrakr
Copy link

barbrakr commented Jun 3, 2019

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?

@effigies
Copy link
Member

effigies commented Jun 3, 2019

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.

@barbrakr
Copy link

barbrakr commented Jun 3, 2019

GitHub is really awesome - thank you so much @effigies for your detailed expert description - I'll get crunching on this!

@JohannesWiesner
Copy link

JohannesWiesner commented Oct 5, 2020

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?

@barbrakr
Copy link

barbrakr commented Oct 5, 2020

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!

@lrq3000
Copy link
Author

lrq3000 commented Oct 6, 2020 via email

@JohannesWiesner
Copy link

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).

@mfmachado
Copy link
Contributor

Hi,

I already made my own CAT12 Nipype Interface following the @effigies suggestions.
I will try to make a PR as soon as possible.

@0rC0
Copy link
Contributor

0rC0 commented Sep 12, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants