From 0c411010bfcb83bc010d506d30dbac35a0082ae4 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 22 Aug 2012 16:51:56 -0400 Subject: [PATCH] Flip bytes again before outputting the 3D data. --- src/Main.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 () -- 2.44.2