- let dbl_data = R.map fromIntegral arrSlice'
- let g = make_grid 1 dbl_data
- let output = zoom g zoom_factor
- let arrBrack = bracket_array output
- let mri_slice2d = drop_z $ zoom_shape zoom_factor mri_slice3d
- let colors = values_to_colors $ R.reshape mri_slice2d
- $ R.map fromIntegral arrBrack
- let routput = R.map (\(red, _, _) -> red) colors
- let goutput = R.map (\(_, green, _) -> green) colors
- let boutput = R.map (\(_, _, blue) -> blue) colors
- R.writeComponentsToBMP out_file routput goutput boutput
+
+ -- If zoom isn't being inlined we need to extract the slice before hand,
+ -- and convert it to the require formed.
+ let dbl_data = R.computeS $ R.map fromIntegral arrSlice'
+ let output = zoom dbl_data zoom_factor
+ let arrSlice0 = R.computeUnboxedS $ z_slice 0 output
+
+ write_values_slice_to_bitmap arrSlice0 out_file