]> Creatis software - clitk.git/commitdiff
- binarize filter
authordsarrut <dsarrut>
Fri, 29 Jan 2010 10:49:55 +0000 (10:49 +0000)
committerdsarrut <dsarrut>
Fri, 29 Jan 2010 10:49:55 +0000 (10:49 +0000)
tools/clitkBinarizeImage.cxx [new file with mode: 0644]
tools/clitkBinarizeImage.ggo [new file with mode: 0644]

diff --git a/tools/clitkBinarizeImage.cxx b/tools/clitkBinarizeImage.cxx
new file mode 100644 (file)
index 0000000..ce10a07
--- /dev/null
@@ -0,0 +1,43 @@
+/*------------------------------------------------------------------------
+                                                                                 
+  Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+  l'Image). All rights reserved. See Doc/License.txt or
+  http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
+                                                                                
+  This software is distributed WITHOUT ANY WARRANTY; without even
+  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+  PURPOSE.  See the above copyright notices for more information.
+                                                                             
+  ------------------------------------------------------------------------*/
+
+/* =================================================
+ * @file   clitkBinarizeImageGenericFilter.txx
+ * @author Jef Vandemeulebroucke <jef@creatis.insa-lyon.fr>
+ * @date   29 June 2009
+ * 
+ * @brief Binarize an image
+ * 
+ ===================================================*/
+
+// clitk
+#include "clitkBinarizeImage_ggo.h"
+#include "clitkBinarizeImageGenericFilter.h"
+
+//--------------------------------------------------------------------
+int main(int argc, char * argv[]) {
+
+  // Init command line
+  GGO(clitkBinarizeImage, args_info);
+  CLITK_INIT;
+
+  // Filter
+  clitk::BinarizeImageGenericFilter<args_info_clitkBinarizeImage>::Pointer filter = 
+    clitk::BinarizeImageGenericFilter<args_info_clitkBinarizeImage>::New();
+  
+  filter->SetArgsInfo(args_info);
+  filter->Update();
+
+  return EXIT_SUCCESS;
+}// end main
+
+//--------------------------------------------------------------------
diff --git a/tools/clitkBinarizeImage.ggo b/tools/clitkBinarizeImage.ggo
new file mode 100644 (file)
index 0000000..c974fe4
--- /dev/null
@@ -0,0 +1,15 @@
+#File clitkBinarizeImage.ggo
+Package "clitkBinarizeImage"
+version "1.0"
+purpose ""
+
+option "config"                -       "Config file"                     string        no
+option "imagetypes"    -       "Verbose available image type"    flag          off
+option "verbose"       v       "Verbose"                         flag          off
+
+option "input"         i       "Input image filename"            string        yes
+option "output"        o       "Output image filename"           string        yes
+option "lower"         l       "Lower intensity (default=min)"   double        no
+option "upper"         u       "Upper intensity (default=max)"   double        no
+option "inside"        -       "Inside value"                    double        no      default="1"
+option "outside"       -       "Outside value"                   double        no      default="0"