- putStrLn "Hello, World."
- -- print $ find_point_value (0,0,0)
- -- print $ find_point_value (1,0,0)
- -- print $ find_point_value (2,0,0)
- -- print $ find_point_value (0,1,0)
- -- print $ find_point_value (1,1,0)
- -- print $ find_point_value (2,1,0)
- -- print $ find_point_value (0,2,0)
- -- print $ find_point_value (1,2,0)
- -- print $ find_point_value (2,2,0)
- -- print $ find_point_value (0,0,1)
- -- print $ find_point_value (1,0,1)
- -- print $ find_point_value (2,0,1)
- -- print $ find_point_value (0,1,1)
- -- print $ find_point_value (1,1,1)
- -- print $ find_point_value (2,1,1)
- -- print $ find_point_value (0,2,1)
- -- print $ find_point_value (1,2,1)
- -- print $ find_point_value (2,2,1)
- -- print $ find_point_value (0,0,2)
- -- print $ find_point_value (1,0,2)
- -- print $ find_point_value (2,0,2)
- -- print $ find_point_value (0,1,2)
- -- print $ find_point_value (1,1,2)
- -- print $ find_point_value (2,1,2)
- -- print $ find_point_value (0,2,2)
- -- print $ find_point_value (1,2,2)
- -- print $ find_point_value (2,2,2)
+ args <- getArgs
+ let color = head args
+ let in_file = "./data/MRbrain.40." ++ color
+ let out_file = "MRbrain.40." ++ color ++ ".out"
+ mridata <- read_values_3d mri_shape in_file
+
+ let g = make_grid 1 mridata
+ let polynomials = make_polynomial_array (255,255,0,23)
+ [ ((i,j,k,tet), polynomial t) | i <- [0..255],
+ j <- [0..255],
+ k <- [0],
+ tet <- [0..23],
+ let c = cube_at g i j k,
+ let t = tetrahedron c tet ]
+
+ let output = zoom g polynomials (8,8,1)
+ write_values_1d output out_file