Twistor transforms of quaternionic functions