-{-# LANGUAGE TypeSynonymInstances #-}
+{-# LANGUAGE FlexibleInstances #-}
module Values
where
import Test.QuickCheck (Arbitrary(..), Gen)
+import ScaleFactor
+
+
type Values1D = Array DIM1 Double
type Values2D = Array DIM2 Double
type Values3D = Array DIM3 Double
read_values_1d :: FilePath -> IO Values1D
-read_values_1d path = readVectorFromTextFile path
+read_values_1d = readVectorFromTextFile
read_values_3d :: DIM3 -> FilePath -> IO Values3D
where
shape :: DIM3
shape = (Z :. i :. j :. k)
+
+
+zoom_shape :: ScaleFactor -> DIM3 -> DIM3
+zoom_shape (sfx, sfy, sfz) sh =
+ let (Z :. x :. y :. z) = sh
+ x' = x * sfx
+ y' = y * sfy
+ z' = z * sfz
+ in
+ (Z :. x' :. y' :. z')