From: Michael Orlitzky Date: Wed, 22 Aug 2012 20:51:56 +0000 (-0400) Subject: Flip bytes again before outputting the 3D data. X-Git-Tag: 0.0.1~36 X-Git-Url: http://gitweb.michael.orlitzky.com/?p=spline3.git;a=commitdiff_plain;h=0c411010bfcb83bc010d506d30dbac35a0082ae4 Flip bytes again before outputting the 3D data. --- diff --git a/src/Main.hs b/src/Main.hs index 5e10d6c..6848ff8 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -89,8 +89,11 @@ main3d Args{..} shape = do let arr_shaped = R.reshape shape arr_swapped dbl_data <- R.computeUnboxedP $ R.map fromIntegral arr_shaped raw_output <- zoom dbl_data zoom_factor - word16_output <- R.computeUnboxedP $ round_array raw_output - write_word16s output word16_output + let word16_output = round_array raw_output + -- Switch the bytes order back to what it was. This lets us use the + -- same program to view the input/output data. + swapped_output <- R.computeUnboxedP $ swap_bytes word16_output + write_word16s output swapped_output main2d :: Args -> R.DIM3 -> IO ()