ENH: Output cast in SingleValuedCostFunctionImageSource.

Make sure to cast to the output image pixel type.
Merge pull request #226 from thewtex/costfunctionimage-cast

ENH: Output cast in SingleValuedCostFunctionImageSource.