swap_bytes arr =
R.force $ R.map flip16 arr
+
bracket_array :: (Shape sh) => (Values sh) -> (RawData sh)
bracket_array arr =
- R.force $ R.map f arr
- where
- f = bracket
+ R.force $ R.map bracket arr
+
+
+round_array :: (Shape sh) => (Values sh) -> (RawData sh)
+round_array arr =
+ R.force $ R.map round arr
flip_y :: RawData3D -> RawData3D
main :: IO ()
main = main3d
-
main3d :: IO ()
main3d = do
(s:_) <- getArgs
let arrMRI = R.reshape mri_shape arr'
let dbl_data = R.force $ R.map fromIntegral arrMRI
let output = zoom dbl_data zoom_factor
- let word16_output = bracket_array output
+ let word16_output = round_array output
write_word16s out_file word16_output