heudiconv
heudiconv copied to clipboard
Heudiconv: Automatically include “IntendedFor” field in the metadata
Dear heudiconv-team, we are using heudiconv and fmriprep for preprocessing functional MRI data. As we would like to use fieldmaps to unwarp these images, the fieldmap-metadata has to include the key “IntendedFor” in order to be used with fmriprep. Is there a way for heudiconv to automatically include this data in the metadata using the heuristic file? I have seen that the package fw-heudiconv does include it, but we would appreciate using the docker version of heudiconv. Thank you very much for you support! Best, Christian
Unfortunately not yet automagically. Original issue https://github.com/nipy/heudiconv/issues/138
In case it's helpful, this is our work around, we do it as a post processing step
I have written a module to do this (and also add a "NumberOfVolumes" field to the functional jsons), and I would like to add it to this repo. To run it, you need to have all the json files extracted in the destination folder, so what would be the place to insert the call?
I think it would be useful also as a "tool" (command) to run, so why not to
- add
populate_intended_for(path_to_bids_session)
to heudiconv/bids.py - interface in
main.py:process_extra_commands
by sweeping across provided paths - then we would need to interface it also in
convert.py:convert