RF: Change `fslchfiletype` to rely on `imcp` doing the type conversion
In FSL 5.0.11, the imcp
and immv
commands were updated to honour the $FSLOUTPUTTYPE
environment variable and to potentially convert image files, rather than just copying them.
Unfortunately at that time we failed to notice that fslchfiletype
relied on immv
performing a naive copy, and so since then fslchfiletype
has not worked correctly in some circumstances.
This MR updates fslchfiletype
so that it performs the file conversion by setting $FSLOUTPUTTYPE
and then calling imcp
. A small suite of unit tests are also included, to validate the behaviour of fslchfiletype
.
The binary fslchfiletype.cc
executable (installed to fslchfiletype_exe
) as been removed, but a copy of the fslchfiletype
script is installed to fslchfiletype_exe
in case anybody was directly calling the binary.