X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FVolumetric.hs;h=f9e8d545cdd1c21160d13df35e5473f123b19df0;hb=16f16e8407c31330f1c29118b06925722da56282;hp=2f2819cf502fcfbeac9f84cb568670b62b300afb;hpb=81673dd2be73c0d276af2ff4e9d5503c07189d53;p=spline3.git diff --git a/src/Volumetric.hs b/src/Volumetric.hs index 2f2819c..f9e8d54 100644 --- a/src/Volumetric.hs +++ b/src/Volumetric.hs @@ -40,7 +40,6 @@ import Data.Array.Repa.IO.Binary ( writeArrayToStorableFile ) import Data.Array.Repa.IO.BMP ( writeImageToBMP ) import Data.Array.Repa.Operators.Traversal ( unsafeTraverse ) -import Data.Array.Repa.Repr.Unboxed ( Unbox ) import Data.Array.Repa.Slice ( All( All ), Any( Any ) ) import Values ( Values, Values2D ) @@ -74,7 +73,7 @@ bracket lower_threshold upper_threshold x where numerator = x - lower_threshold denominator = upper_threshold - lower_threshold - r = numerator/denominator + r = numerator / denominator flip16 :: Word16 -> Word16 @@ -149,6 +148,6 @@ write_values_to_bmp path values = do writeImageToBMP path colors -z_slice :: (Unbox a, Source r a) => Int -> Array r DIM3 a -> Array D DIM2 a +z_slice :: (Source r a) => Int -> Array r DIM3 a -> Array D DIM2 a z_slice n arr = slice arr (Any :. n :. All :. All)