X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FValues.hs;h=61e3a11d3c2cd274afb5963bd5ba4091c8d4df86;hb=043d7296b08add8050a54c463d06c78b06eb9838;hp=a33bbba56d3eef9da970d845de285af4c39ac39d;hpb=2a90a63d5fbc8fb57a97e97054e139f5284bf7b0;p=spline3.git diff --git a/src/Values.hs b/src/Values.hs index a33bbba..61e3a11 100644 --- a/src/Values.hs +++ b/src/Values.hs @@ -79,4 +79,14 @@ idx v3d i j k = index v3d shape where shape :: DIM3 - shape = (Z :. i :. j :. k) + shape = (Z :. k :. j :. i) + + +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')