BUG: Need to set 3rd dir cosine for DICOM images

DICOM images are always read in DCMTKImageIO as 3D even when they're
single-slice files. This is because DICOM slice files always have a
3D orientation. But DCMTKImageIO::ReadImageIO was only setting the
third direction cosine if the Z dimension was greater than 1.

This accidentally worked in many cases, as the 3rd dir cosine is
initialized to 0 0 1.  But in cases where another dir cosine is
0 0 N (or close to that), it makes for degenerate orientation
matrices.

Change-Id: I33cd39e3cd715bdddf3791cbbe08e562d2eb6088
Merge topic 'DICOM_DIRCOSINES_BUG'

df53542 BUG: Need to set 3rd dir cosine for DICOM images