heudiconv icon indicating copy to clipboard operation
heudiconv copied to clipboard

Heudiconv: Automatically include “IntendedFor” field in the metadata

Open ChristianNSchmitz opened this issue 4 years ago • 4 comments

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

ChristianNSchmitz avatar Nov 04 '20 23:11 ChristianNSchmitz

Unfortunately not yet automagically. Original issue https://github.com/nipy/heudiconv/issues/138

yarikoptic avatar Nov 05 '20 00:11 yarikoptic

In case it's helpful, this is our work around, we do it as a post processing step

mirestrepo avatar Nov 13 '20 02:11 mirestrepo

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?

pvelasco avatar Dec 08 '20 20:12 pvelasco

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

yarikoptic avatar Dec 08 '20 23:12 yarikoptic