heudiconv extensions
Idea brought from #381 - allow the use of extensions to do additional processing during conversions
Sounds great. We should identify core steps and probably go with a mechanism similar to git hooks, just pick them up across different levels (system, user, current dataset). Or may be there is a better way?
Having an extension mechanism would be great. What I think would make sense for #381 would be to somehow benefit from the dicom grouping and organization work which heudiconv already does, but to then allow some user-defined code to run over the grouping and add output results to the bids directory.
I'm not entirely sure that covers our use case though. @darrencl you are the one who knows the gory detail of how our script was implemented; perhaps you can follow along here as well.
I agree that it is useful to allow users run their code on groupings produced by heudiconv. Getting access to particular item of seqinfo or filegroup (in our case, the MRS) and being able to run custom processing on that may be enough for our script to integrate with heudiconv.
On a side note, if heudiconv are planning to support the extension which would run over various BIDS extensions, including MRS, this following checking needs to be turned off or modified.
https://github.com/nipy/heudiconv/blob/dcc590d0be8c514211c8a7323467acce2b338e9c/heudiconv/dicoms.py#L151-L154