1 {-# LANGUAGE FlexibleInstances #-}
14 import Data.Array.Repa (
25 import System.FilePath ()
27 import ScaleFactor (ScaleFactor)
30 type Values sh = Array U sh Double
31 type Values2D = Values DIM2
32 type Values3D = Values DIM3
36 empty3d = Data.Array.Repa.fromListUnboxed (Z :. 0 :. 0 :. 0) []
39 dims :: Values3D -> (Int, Int, Int)
41 let (Z :. x :. y :. z) = extent v3d
46 idx :: Values3D -> Int -> Int -> Int -> Double
51 shape = (Z :. i :. j :. k)
54 zoom_shape :: ScaleFactor -> DIM3 -> DIM3
55 zoom_shape (sfx, sfy, sfz) sh =
56 let (Z :. x :. y :. z) = sh