Mouse-Imaging-Centre / pydpiper

Python code for flexible pipeline control
Other
25 stars 10 forks source link

antsRegistration (and other) protocols #365

Open bcdarwin opened 6 years ago

bcdarwin commented 6 years ago

Pydpiper now supports antsRegistration but not yet user-specified protocols ... these can be pretty complex and I didn't want to make things too difficult or complex. We should think about what sort of protocol files we'd like to support and how parsers can be written in Python without too much tedium.

gdevenyi commented 5 years ago

I'd like to start writing my own antsRegistration based protocols, are these available yet for testing?

bcdarwin commented 5 years ago

Unfortunately I haven't had time to work on this yet. If you have any ideas for nice ways of writing these longer protocols let me know. Ideally I'd like to use https://github.com/dhall-lang/dhall-lang but there doesn't seem to be Python bindings for it yet.

gdevenyi commented 5 years ago

What about writing/maintaining in dhall and converting to json or yaml for use?

bcdarwin commented 5 years ago

I'd be fine with doing this as long as we had some way of generating the documentation automatically. Tools for doing this with Dhall specs exist but we'd need a way of converting the spec to Python code for a yaml parser, which seems a bit unlikely to exist.

bcdarwin commented 4 years ago

Another question is whether we should call antsRegistration via the shell or use antspy. In principle since Pydpiper is a Python framework the latter makes more sense, although (i) Pydpiper is highly oriented to calling command-line programs; (ii) antspy doesn't provide a particularly "Pythonic" API (e.g. use of strings instead of e.g. tuples of numbers for arguments, storing transforms on disk and returning paths to them)

gdevenyi commented 4 years ago

One could also just go straight to SimpleITK or ITK's pythonic interface.

Having kept a close eye on the code, both ANTsR and antspy appear to be flaky wrappers which don't add much benefit besides a python interface.