]> gitweb.michael.orlitzky.com - spline3.git/blob - src/Main.hs
Add the current Main module, which works alrightish.
[spline3.git] / src / Main.hs
1 module Main
2 where
3
4 import Data.Array.Repa (
5 DIM3,
6 Z(..),
7 (:.)(..),
8 )
9
10 import System.Environment (getArgs)
11
12 import Values (read_values_3d, write_values_1d)
13 import Grid (make_grid, zoom)
14
15 mri_shape :: DIM3
16 mri_shape = (Z :. 256 :. 256 :. 1)
17
18 main :: IO ()
19 main = do
20 args <- getArgs
21 let color = args !! 0
22 let in_file = "./data/MRbrain.40." ++ color
23 let out_file = "MRbrain.40." ++ color ++ ".out"
24 mridata <- read_values_3d mri_shape in_file
25 let g = make_grid 1 mridata
26 let output = zoom g (8,8,1)
27 write_values_1d output out_file