]> gitweb.michael.orlitzky.com - spline3.git/blobdiff - src/Values.hs
Convert the zoom function to use Values3D.
[spline3.git] / src / Values.hs
index a33bbba56d3eef9da970d845de285af4c39ac39d..1b8548e026a52195cd7a739351f0e4a90a1c95e0 100644 (file)
@@ -80,3 +80,13 @@ idx v3d i j k =
     where
       shape :: DIM3
       shape = (Z :. i :. j :. k)
+
+
+zoom_shape :: Int -> DIM3 -> DIM3
+zoom_shape scale_factor sh =
+    let (Z :. x :. y :. z) = sh
+        x' = x * scale_factor
+        y' = y * scale_factor
+        z' = z * scale_factor
+    in
+      (Z :. x' :. y' :. z')