Large port of MRI IO transcoding logic, to fill in our gaps.