Fix bugs for bad code added when added read with casting

Change-Id: I89042cd70dbb693339bc11437b3b180a362c51ca
Merge topic 'SIMPLEITK-345_AddOutputPixelTypeToImageReaders' into next

a883bfe5 Fix bugs for bad code added when added read with casting