BUG: Use referenceImage for output information

Actually use the reference image to set the output information of the
displacement field. Also use named input macros for inputs.

Change-Id: Id4caec8285544d1e7fec335bdf448191f4881da8
Merge topic 'UseNamedInputForTransformToDisplacementField'

6212020b BUG: Use referenceImage for output information