]> Creatis software - clitk.git/commitdiff
add test
authordsarrut <dsarrut>
Wed, 15 Dec 2010 08:54:23 +0000 (08:54 +0000)
committerdsarrut <dsarrut>
Wed, 15 Dec 2010 08:54:23 +0000 (08:54 +0000)
segmentation/CMakeLists.txt
segmentation/clitkTestFilter.cxx
segmentation/clitkTestFilter.ggo

index 4b6b2dc7bf08a0cebc8f3f0d4b6aedd56e20e1db..0018e1f777a4eae78260b0af36595543da1e1eea 100644 (file)
@@ -38,11 +38,11 @@ IF(CLITK_BUILD_SEGMENTATION)
 
     WRAP_GGO(clitkExtractMediastinum_GGO_C clitkExtractMediastinum.ggo)
     ADD_EXECUTABLE(clitkExtractMediastinum clitkExtractMediastinum.cxx ${clitkExtractMediastinum_GGO_C})
-    TARGET_LINK_LIBRARIES(clitkExtractMediastinum clitkCommon clitkSegmentationGgoLib ITKIO)
+    TARGET_LINK_LIBRARIES(clitkExtractMediastinum clitkCommon clitkSegmentationGgoLib ITKStatistics ITKIO)
 
     WRAP_GGO(clitkExtractLymphStations_GGO_C clitkExtractLymphStations.ggo)
     ADD_EXECUTABLE(clitkExtractLymphStations clitkExtractLymphStations.cxx clitkFilterWithAnatomicalFeatureDatabaseManagement.cxx ${clitkExtractLymphStations_GGO_C})
-    TARGET_LINK_LIBRARIES(clitkExtractLymphStations clitkSegmentationGgoLib clitkCommon ITKIO )
+    TARGET_LINK_LIBRARIES(clitkExtractLymphStations clitkSegmentationGgoLib clitkCommon ITKIO ITKStatistics)
 
     WRAP_GGO(clitkMorphoMath_GGO_C clitkMorphoMath.ggo)
     ADD_EXECUTABLE(clitkMorphoMath clitkMorphoMath.cxx clitkMorphoMathGenericFilter.cxx ${clitkMorphoMath_GGO_C})
@@ -79,4 +79,16 @@ IF(CLITK_BUILD_SEGMENTATION)
     WRAP_GGO(clitkFillImageRegion_GGO_C clitkFillImageRegion.ggo)
     ADD_EXECUTABLE(clitkFillImageRegion clitkFillImageRegion.cxx clitkFillImageRegionGenericFilter.cxx ${clitkFillImageRegion_GGO_C})
     TARGET_LINK_LIBRARIES(clitkFillImageRegion clitkCommon ITKIO)
+
+    WRAP_GGO(clitkTestFilter_GGO_C clitkTestFilter.ggo)
+    ADD_EXECUTABLE(clitkTestFilter clitkTestFilter.cxx ${clitkTestFilter_GGO_C})
+    TARGET_LINK_LIBRARIES(clitkTestFilter clitkSegmentationGgoLib clitkCommon ITKIO)
+
 ENDIF(CLITK_BUILD_SEGMENTATION)
+
+# ADD_EXECUTABLE(ScalarImageMarkovRandomField1 ScalarImageMarkovRandomField1.cxx)
+# TARGET_LINK_LIBRARIES(ScalarImageMarkovRandomField1 clitkCommon ITKIO ITKStatistics)
+# ADD_EXECUTABLE(ScalarImageKmeansClassifier ScalarImageKmeansClassifier.cxx)
+# TARGET_LINK_LIBRARIES(ScalarImageKmeansClassifier clitkCommon ITKIO ITKStatistics)
+
+
index a0b386d5ca7bbd710f9c03e5a3b8735698c9eab5..37c6d91df64f49e136a14d9000da6844ef4d85d1 100644 (file)
@@ -30,6 +30,8 @@
 #include "clitkExtractPatientFilter.h"
 #include "clitkExtractMediastinumFilter.h"
 
+#include "clitkTestStation7.h"
+
 // ITK ENST
 #include "RelativePositionPropImageFilter.h"
 
@@ -49,7 +51,7 @@ int main(int argc, char * argv[]) {
   InputImageType::Pointer input1;
   InputImageType::Pointer input2;
   InputImageType::Pointer input3;
-  input1 = clitk::readImage<InputImageType>(args_info.input1_arg, true);
+  if (args_info.input1_given) input1 = clitk::readImage<InputImageType>(args_info.input1_arg, true);
   if (args_info.input2_given) input2 = clitk::readImage<InputImageType>(args_info.input2_arg, true);
   if (args_info.input3_given) input3 = clitk::readImage<InputImageType>(args_info.input3_arg, true);
   
@@ -74,7 +76,7 @@ int main(int argc, char * argv[]) {
   
   //--------------------------------------------------------------------
   // Filter test AutoCropLabelImageFilter
-  if (1) {
+  if (0) {
     typedef clitk::AutoCropFilter<InputImageType> FilterType;
     FilterType::Pointer filter = FilterType::New();
     filter->SetInput(input1);
@@ -155,6 +157,7 @@ int main(int argc, char * argv[]) {
   //--------------------------------------------------------------------
   // Filter test ExtractPatientFilter
   if (0) {
+    /*
     typedef itk::Image<char, Dim> OutputImageType;
     typedef clitk::ExtractPatientFilter<InputImageType, OutputImageType> FilterType;
     FilterType::Pointer filter = FilterType::New();
@@ -167,11 +170,13 @@ int main(int argc, char * argv[]) {
     filter->Update();    
     OutputImageType::Pointer output = filter->GetOutput();
     clitk::writeImage<OutputImageType>(output, args_info.output_arg);
+    */
   }
 
   //--------------------------------------------------------------------
   // Filter test ExtractLungsFilter
   if (0) {
+    /*
     typedef itk::Image<PixelType, Dim> OutputImageType; // to change into char
     typedef clitk::ExtractLungFilter<InputImageType, OutputImageType> FilterType;
     FilterType::Pointer filter = FilterType::New();
@@ -188,11 +193,13 @@ int main(int argc, char * argv[]) {
     filter->Update();    
     OutputImageType::Pointer output = filter->GetOutput();
     clitk::writeImage<OutputImageType>(output, args_info.output_arg);
+    */
   }
 
   //--------------------------------------------------------------------
   // Filter test ExtractMediastinumFilter
   if (0) {
+    /*
     typedef clitk::ExtractMediastinumFilter<InputImageType> FilterType;
     FilterType::Pointer filter = FilterType::New();
     filter->SetInputPatientLabelImage(input1);
@@ -203,6 +210,16 @@ int main(int argc, char * argv[]) {
     filter->Update();    
     output = filter->GetOutput();
     clitk::writeImage<InputImageType>(output, args_info.output_arg);
+    */
+  }
+
+  //--------------------------------------------------------------------
+  // Test for auto register sub-task in a segmentation process
+  if (1) {
+    ExtractLymphStation_7 * s7 = new ExtractLymphStation_7;
+    //    s7->SetArgsInfo<args_info_clitkTestFilter>(args_info);
+    // GetParent->SetArgsInfo<>
+    s7->StartSegmentation();
   }
 
   // This is the end my friend
index d9778e715cb6951a058805e2fe77d348e9d9d93a..6ab0ebbe6a7e83f44cc272bd982e0182aa99047c 100644 (file)
@@ -6,10 +6,10 @@ purpose "Test a filter"
 option "config"                -       "Config file"                     string        no
 option "verbose"       v       "Verbose"                         flag          off
 
-option "input1"                i       "Input 1 image filename"          string        yes
+option "input1"                i       "Input 1 image filename"          string        no
 option "input2"                j       "Input 2 image filename"          string        no
 option "input3"                k       "Input 3 image filename"          string        no
-option "output"        o       "Output image filename"           string        yes
+option "output"        o       "Output image filename"           string        no
 
 option "angle1"        a       "First angle (degree)"            float         default = "0" no
 option "angle2"        b       "Second angle (degree)"           float         default = "0" no