X-Git-Url: https://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FCommandLine.hs;h=f413e2fb214b98840795c8c5201b8d18df517104;hb=02df1d5763a5d2bfe750bbc30b5c001ee9b23b17;hp=6479145b2693f6a36e48f53c33db4eb9b836d687;hpb=35b9e3c87866d956c1ffd34ec5f4823947f51fc2;p=spline3.git diff --git a/src/CommandLine.hs b/src/CommandLine.hs index 6479145..f413e2f 100644 --- a/src/CommandLine.hs +++ b/src/CommandLine.hs @@ -45,9 +45,11 @@ data Args = Args { depth :: Int, height :: Int, input :: FilePath, + lower_threshold :: Int, + output :: FilePath, scale :: Int, slice :: Maybe Int, - output :: FilePath, + upper_threshold :: Int, width :: Int } deriving (Show, Data, Typeable) @@ -65,35 +67,75 @@ spline3_summary :: String spline3_summary = program_name ++ "-" ++ (showVersion version) +depth_default :: Int +depth_default = 109 + depth_help :: String -depth_help = "The size of the z dimension (default: 109)" +depth_help = + "The size of the z dimension (default: " ++ (show depth_default) ++ ")" + +height_default :: Int +height_default = 256 height_help :: String -height_help = "The size of the y dimension (default: 256)" +height_help = + "The size of the y dimension (default: " ++ (show height_default) ++ ")" + +lower_threshold_default :: Int +lower_threshold_default = 1400 + +lower_threshold_help :: String +lower_threshold_help = + "The lower limit for voxel values, only used in 2D (default: " ++ + (show lower_threshold_default) ++ ")" + +scale_default :: Int +scale_default = 2 scale_help :: String scale_help = "The magnification scale. A scale of 2 would result " ++ - "in an image twice as large as the original. (default: 2)" + "in an image twice as large as the original. (default: " ++ + (show scale_default) ++ ")" slice_help :: String slice_help = "The index of the two-dimensional slice to use if no depth is specified" +upper_threshold_default :: Int +upper_threshold_default = 2500 + +upper_threshold_help :: String +upper_threshold_help = + "The upper limit for voxel values, only used in 2D (default: " ++ + (show upper_threshold_default) ++ ")" + +width_default :: Int +width_default = 256 + width_help :: String -width_help = "The size of the x dimension (default: 256)" +width_help = + "The size of the x dimension (default: " ++ (show width_default) ++ ")" arg_spec :: Mode (CmdArgs Args) arg_spec = cmdArgsMode $ Args { - depth = 109 &= groupname "Dimensions" &= help depth_help, - height = 256 &= groupname "Dimensions" &= help height_help, - input = def &= typ "INPUT" &= argPos 0, - output = def &= typ "OUTPUT" &= argPos 1, - scale = 2 &= help scale_help, - slice = Nothing &= groupname "2D options" &= help slice_help, - width = 256 &= groupname "Dimensions" &= help width_help + depth = depth_default &= groupname "Dimensions" &= help depth_help, + height = height_default &= groupname "Dimensions" &= help height_help, + input = def &= typ "INPUT" &= argPos 0, + + lower_threshold = lower_threshold_default &= groupname "2D options" + &= help lower_threshold_help, + + output = def &= typ "OUTPUT" &= argPos 1, + scale = scale_default &= help scale_help, + slice = Nothing &= groupname "2D options" &= help slice_help, + + upper_threshold = upper_threshold_default &= groupname "2D options" + &= help upper_threshold_help, + + width = width_default &= groupname "Dimensions" &= help width_help } &= program program_name &= summary spline3_summary