1 {-# LANGUAGE FlexibleInstances #-}
13 import Data.Array.Repa (
23 import ScaleFactor ( ScaleFactor )
26 type Values sh = Array U sh Double
27 type Values2D = Values DIM2
28 type Values3D = Values DIM3
32 empty3d = Data.Array.Repa.fromListUnboxed (Z :. 0 :. 0 :. 0) []
35 dims :: Values3D -> (Int, Int, Int)
37 let (Z :. x :. y :. z) = extent v3d
42 idx :: Values3D -> Int -> Int -> Int -> Double
47 shape = (Z :. i :. j :. k)
50 zoom_shape :: ScaleFactor -> DIM3 -> DIM3
51 zoom_shape (sfx, sfy, sfz) sh =
52 let (Z :. x :. y :. z) = sh