Closed
Description
Summary
While PR #345 successfully treats PD+T2 pairs as multi-echo, we now get runtime errors when such acquisitions are missing the EchoNumber
tag:
*Runtime**Error**: was asked to copy X but destination already exists: Y
Using the --overwrite
option eliminates the error but only leaves us with one echo.
Presently, multi echo support depends on EchoNumber
tag, but given there are DICOM files in the wild that lack this tag we need a backup logic, presumably based on EchoTime
. I can see that this requires a modification to the logic of save_converted_files
in convert.py... something like
EchoNumberBackup = [x+1 for x in sorted(range(len(echo_times)), key=echo_times.__getitem__)]
and then assignment of echo_number
will need to check for empty value and use EchoNumberBackup
when missing. I can almost see what to do but it's just a bit beyond my very elementary Python.
Platform details:
Choose one:
- Local environment
Python 3.6.6
- Heudiconv version:
v0.5.4 + PR #345 patch