I'm using BIDS naming, but the suffix "_T1w" was not recognized by mri_reface, so I had to specify "-imType" to run it. Error text:
"Unable to determine image type from filename for
sub-paul_run-5_acq-MPRAGE_T1w. Use an input filename that contains
one of: _T1, _T2, _T1w, _T2w,
_T2star, _T2starw, _FLAIR, _PD, _PDW, _FDG, _PIB, _AV45, _FBP,
_FMT, _FBB, _TAU, _AV1451, _CT, or specify with -imType\n"
I note the help text lists different allowed strings:
"-imType "
Please add BIDS suffixes to the code in the next update, and make the help text and error text match. These include:
- T1w
- T2w
- T2star
- T2starw
- PDw
The suffixes below are listed in the error message, but not in the help text, neither in the BIDS glossary. I don't have an opinion about recognizing these, but please remove them from the error message if you decide not to recognize them.
- AV45
- FMT
- FBB
- AV1451
I added the BIDS suffixes in the last release after another request on this board. Actually what happened here is that you have two recognized strings ("T1w" and "MPRAGE") in the same filename, and I didn't code it to understand that some strings are aliases of the same type, i.e. not in conflict with each other. I tried to help people by adding more strings, and it bit me by not accounting for some inputs having >1 string (even though MPRAGE and _T1w together would be a pretty common name from dcm2niix). I agree that recognizing BIDS names is a worthy goal, but BIDS suffixes aren't detailed enough to handle everything (e.g. PET types you listed). Maybe the best answer is to prioritize BIDS suffixes when they exist and fall back to the rest when they don't. I think that would work, but I'll test some examples and think on it. That seems easier than building an "aliases" logic. Either way, thanks for reporting this. It's new to me, and I agree it's a bug.
That said, if you're planning this at large scale, I'd suggest your wrapper-scripts make use of the -imType option rather than rely on the guessing. The taxonomy of image types and common names in the wild is just too complicated to rely on it entirely. PET tracers have multiple names. Sometimes MR sequences have different vendor names too. Most of the time we assume "FLAIR" means T2-FLAIR, but "T1 FLAIR" exist and should be de-faced like a T1. It's complex. I will try to improve things because your example is definitely a common case that should work, but it'll never be perfect.
Chris
