plotRegions :: Image -> (Point -> Site) -> IO ()
plotRegions im closestTo = do
    mapM_ (\(p, c) -> setPixel p c im) cpoints
    return ()
  where
    points = [(x, y) | x <- [0..fst imgsize - 1], y <- [0..snd imgsize - 1]]
    cpoints = map (\p -> (p, snd (closestTo p))) points
plotRegions :: Image -> (Point -> Site) -> IO ()
plotRegions im closestTo = do
    mapM_ (\(p, c) -> setPixel p c im) cpoints
    return ()
  where
    points = [(x, y) | x <- [0..fst imgsize - 1], y <- [0..snd imgsize - 1]]
    cpoints = map (\p -> (p, snd (closestTo p))) points
plotRegions im closestTo = do
    mapM_ (\(p, c) -> setPixel p c im) cpoints
    return ()
  where
    points = [(x, y) | x <- [0..fst imgsize - 1], y <- [0..snd imgsize - 1]]
    cpoints = map (\p -> (p, snd (closestTo p))) points