packages feed

explore 0.0.6.0 → 0.0.6.1

raw patch · 3 files changed

+130/−8 lines, 3 files

Files

+ Help.hs view
@@ -0,0 +1,118 @@+module Help where
+
+help :: String
+help = "\SYNOPSIS\+\\+\  explore image legend tolerance scan-area interval [translation]\+\\+\\+\DESCRIPTION\+\\+\\+\   image         the image file to scan, it should be a 32-bit PNG with an alpha\+\                 channel\+\\+\\+\\+\   legend        the legend file that contains a list of names and base line\+\                 colors in this format\+\\+\                  [(\"Frame\", RGBA 255 0 0 255),(\"Line\",  RGBA 0 0 255 255)]\+\\+\\+\\+\   tolerance     how much color components can deviate from base colors\+\               \+\                  S            strict: allow no deviation         (= TC 0 0 0 0)\+\\+\                  TA m         maximum delta for all components   (= TC m m m m)\+\\+\                  TC r g b a   individiual maximum delta values\+\                               for corresponding components\+\\+\\+\\+\   scan-area     which part of the image is to be scanned\+\\+\                                            (w = image width, h = image height)\+\\+\                  F            all image area                  (= B 0 0 w h)\+\\+\                  O l t        offset from left and top        (= B l t w h)\+\\+\                  M l t r b    margins from left, top,         (= B l t w-r h-b)\+\                               right and bottom\+\\+\                  B l t r b    a plot box; with left, top, right and bottom\+\                               positions in pixels\+\\+\\+\\+\   interval      horizontal scan interval in pixels, this value is read as\+\                 a floating point number so you can give 4,5 for a scan\+\\+\ \+\  \+\   translation   2d translation to be applied to the output pixels\+\\+\                  Identity     output pixels exactly as they are located\+\                               in the input image; old default with full\+\                               scan area\+\\+\                  Box Bottom   output pixel positions relevant to the left\+\                               and bottom lines of the plot box; new default\+\\+\                  Box Top      output pixel positions relevant to the left\+\                               and top lines of the plot box\+\\+\\+\HISTORY\+\\+\  0.0.6\+\  - Added basic 2D translation support\+\  - Changed default 2D translation from Identity to \"Box Bottom\"\+\    To get old behaviour from previous versions: use Identity\+\\+\  0.0.5\+\  - First version created in collaboration with An Le Thi Thanh\+\\+\\+\KNOWN ISSUES\+\\+\  - It is only a very early hack ^__^\"!!\+\  - Line occlusion causes matches to fail.\+\  - Supports only 32-bit PNGs (with an alpha/transparency channel).\+\  - No automatic recognition whatsoever of figures/plots given\+\    a full page. Lots of happy moments with Gimp and Inkscape!!\+\\+\\+\EXAMPLES\+\\+\  - The example plots provided with this package are from:\+\\+\      Incorporating Environmental factors in\+\      Modelling Malaria Transmission in under five\+\      children in Rural Burkina Faso\+\\+\      Inaugural Dissertation to attain the degree of\+\      Doctor Scientiarum humanarum (Dr. Sc. Hum.)\+\\+\      At the Medical Faculty of Ruprecht-Karls-University\+\      Heidelberg\+\\+\      submitted by Yazoumé Yé\+\\+\      from Sayoro, Burkina Faso\+\      September 2005\+\\+\\+\  - To create the example outputs:\+\\+\      explore 39-cisse-x.png 39-legend \"TC 100 150 150 150\" F 20.83 Identity\+\      explore 39-goni-x.png  39-legend \"TC 100 150 150 150\" F 20.83 Identity\+\      explore 39-nouna-x.png 39-legend \"TC 100 150 150 150\" F 20.83 Identity\+\\+\\+\CONTACT\+\\+\  Cetin Sert, <cetin.sert@gmail.com>"
Main.hs view
@@ -11,8 +11,11 @@ import Foreign.Storable
 import Data.Array.Storable import Control.Monad
-import Codec.Image.PNG
-
+import Codec.Image.PNG++import Help
++-- | line names in legends
 type Name = String
  -- | 32-bit color representation
@@ -67,7 +70,7 @@  -- | check presence of arguments, show usage otherwise checkArgs :: [String] -> IO ()-checkArgs [] = readFile "README" >>= putStrLn >> exitWith (ExitFailure 1)+checkArgs [] = putStrLn help >> exitSuccess checkArgs _  = return ()  @@ -75,6 +78,8 @@ main :: IO ()
 main = do   putStrLn $ "ExPloRe 0.0.6.0 : Experimental Plot Reconstructor"+  putStrLn $ "-------------------------------------------------------------------"+  putStrLn $ ""   args <- getArgs   checkArgs args   let (imgPath:legendPath:matching_:area_:step_:oargs) = args@@ -89,8 +94,6 @@   let bitmap  = imageData  img
   let (wu,hu) = dimensions img
   let (w,h)   = (fromIntegral wu, fromIntegral hu)
-  putStrLn $ "-------------------------------------------------------------------"-  putStrLn $ ""   putStrLn $ "call  : " ++ tail (filter (/= '"') $ concatMap ((' ':) . show) args)   putStrLn $ ""
   putStrLn $ "image : " ++ imgPath
explore.cabal view
@@ -1,5 +1,5 @@ name:                explore-version:             0.0.6.0+version:             0.0.6.1 cabal-version:       >= 1.4 license:             BSD3 license-file:        LICENSE@@ -7,7 +7,7 @@ author:              Cetin Sert maintainer:          Cetin Sert <cetin.sert@gmail.com> bug-reports:         Cetin Sert <cetin.sert@gmail.com>-homepage:            http://corsis.sf.net+homepage:            http://corsis.sourceforge.net/haskell/explore category:            Graphics synopsis:            Experimental Plot data Reconstructor description:         Very first prototype of a command line tool to@@ -29,7 +29,8 @@                      Thesis_FullVer280705.svg                      39-cisse.output,                      39-goni.output,-                     39-nouna.output+                     39-nouna.output,+                     Help.hs  Executable           explore   buildable:         True