]> Creatis software - clitk.git/commitdiff
Agata - why did you delete these tools ?
authorBenoît Presles <benoit.presles@creatis.insa-lyon.fr>
Mon, 2 Jun 2014 14:44:21 +0000 (16:44 +0200)
committerBenoît Presles <benoit.presles@creatis.insa-lyon.fr>
Mon, 2 Jun 2014 14:44:21 +0000 (16:44 +0200)
tools/CMakeLists.txt
tools/clitkBlurImage.ggo
tools/clitkBlurImageGenericFilter.txx
tools/clitkImageGradientMagnitude.ggo
tools/clitkImageGradientMagnitudeGenericFilter.txx
tools/clitkImageLaplacian.ggo
tools/clitkImageLaplacianGenericFilter.txx

index 0b12205f1be214b81499f74f49c6ef0418b61457..08c4a25fb575ba67df26a8c6e101cce69caf7ca4 100644 (file)
@@ -305,6 +305,11 @@ IF (CLITK_BUILD_TOOLS)
   TARGET_LINK_LIBRARIES(clitkImageUncertainty clitkCommon ${ITK_LIBRARIES})
   SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageUncertainty)
 
+  WRAP_GGO(clitkNormalizeImageFilter_GGO_C clitkNormalizeImageFilter.ggo)
+  ADD_EXECUTABLE(clitkNormalizeImageFilter clitkNormalizeImageFilter.cxx ${clitkNormalizeImageFilter_GGO_C})
+  TARGET_LINK_LIBRARIES(clitkNormalizeImageFilter clitkCommon )
+  SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkNormalizeImageFilter)
+
   WRAP_GGO(clitkImageGradientMagnitude_GGO_C clitkImageGradientMagnitude.ggo)
   ADD_EXECUTABLE(clitkImageGradientMagnitude clitkImageGradientMagnitude.cxx ${clitkImageGradientMagnitude_GGO_C})
   TARGET_LINK_LIBRARIES(clitkImageGradientMagnitude clitkCommon )
@@ -320,6 +325,10 @@ IF (CLITK_BUILD_TOOLS)
   TARGET_LINK_LIBRARIES(clitkImageIntensityWindowing clitkCommon )
   SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkImageIntensityWindowing)
 
+  WRAP_GGO(clitkBlurImage_GGO_C clitkBlurImage.ggo)
+  ADD_EXECUTABLE(clitkBlurImage clitkBlurImage.cxx ${clitkBlurImage_GGO_C})
+  TARGET_LINK_LIBRARIES(clitkBlurImage clitkCommon )
+  SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBlurImage)
 
   #=========================================================
   option(CLITK_USE_ROOT "Build experimental tools using root" OFF)
index a97becd0fd78a76f8cae044f89c3cd3e28994438..cbcd40c3f1586553cee823e00080353492ec33c7 100644 (file)
@@ -11,4 +11,4 @@ option "imagetypes"   -       "Display allowed image types"     flag          off
 option "input"         i       "Input image filename"            string        required
 option "output"        o       "Output image filename"           string        required
 
-option "variance"       -      "value of the gaussian variance (multiple values=number of image dimension)"    double  required    multiple
+option "variance"       -      "value of the gaussian variance (multiple values=number of image dimension) - default=1.0" double  optional  multiple
index 6868320b31cc5fb8943dcf591e19391b56ccdcda..307ddb695f97916bc327a3f4cf8dbae2d5863925 100644 (file)
@@ -86,15 +86,22 @@ BlurImageGenericFilter<args_info_type>::UpdateWithInputImageType()
 
   //std::cout<<"mArgsInfo.variance_given"<<mArgsInfo.variance_given<<std::endl;
 
-  if (mArgsInfo.variance_given != dim) {
-    std::cerr << "The number of variance parameters must be equal to the image dimension." << std::endl;
-    return;
-  }
 
+  //if (mArgsInfo.variance_given != dim) {
+  //  std::cerr << "The number of variance parameters must be equal to the image dimension." << std::endl;
+  //  return;
+  //}
+
+  if (mArgsInfo.variance_given && mArgsInfo.variance_given == dim) {
   for (unsigned int i = 0; i < dim; i++) {
     //std::cout<<"mArgsInfo.variance_arg[i]"<<mArgsInfo.variance_arg[i]<<std::endl;
     varianceArray[i] = mArgsInfo.variance_arg[i];
   }
+  } else {
+      for (unsigned int i = 0; i < dim; i++) {
+          varianceArray[i] = 1.0;
+      }
+  }
   // Reading input
   typename InputImageType::Pointer input = this->template GetInput<InputImageType>(0);
 
@@ -109,6 +116,8 @@ BlurImageGenericFilter<args_info_type>::UpdateWithInputImageType()
   gaussianFilter->SetVariance(varianceArray);
   gaussianFilter->Update();
 
+  //std::cout<<"variance value="<<gaussianFilter->GetVariance()<<std::endl;
+
   // Write/Save results
   this->template SetNextOutput<OutputImageType>(gaussianFilter->GetOutput());
 }
index 3863262dc5ca6deab29e3c59647e422031d8831d..90c207396bb315e4313bc576c0651841a9bd1d78 100644 (file)
@@ -12,4 +12,4 @@ option "input"                i       "Input image filename"            string        required
 option "mask"          m       "Mask input image filename"       string        optional
 option "output"        o       "Output image filename"           string        required
 option "normalize"      n       "Normalize the output image between 0 and 1"    flag off
-option "gaussian_filter" g      "Gaussian filtering"              flag          off
+option "gaussian_filter" g      "Gaussian filtering - default sigma value=1.0"              flag          off
index 19bf8236f8958c191b8d304f0ee0b236c34de3ff..1df5601732e76c5fd40683697039f841468edb33 100644 (file)
@@ -141,6 +141,7 @@ namespace clitk
             typename GradientMagnitudeImageFilterType::Pointer gradientFilter=GradientMagnitudeImageFilterType::New();
             gradientFilter->SetInput(input);
             gradientFilter->Update();
+            //std::cout<<"sigma value="<<gradientFilter->GetSigma()<<std::endl;
             outputGradientFilter = gradientFilter->GetOutput();
         }
         // Set iterator
index 4ba1afdbdeb4f4e4add6786a8c63d9716243e2fd..43b70d16bd9b694941e9ab5494e2d45e37d1c08f 100644 (file)
@@ -12,4 +12,4 @@ option "input"                i       "Input image filename"            string        required
 option "mask"          m       "Mask input image filename"       string        optional
 option "output"        o       "Output image filename"           string        required
 option "normalize"      n       "Normalize the output image between 0 and 1"    flag off
-option "gaussian_filter" g      "Gaussian filtering"              flag          on
+option "gaussian_filter" g      "Gaussian filtering - default sigma value=1.0"              flag          on
index 940e9fcd8514217aef707a9d8d954e81c06fe273..ba36d18e0e0a77735b0aff4a32556276b91fbfb0 100644 (file)
@@ -143,6 +143,7 @@ ImageLaplacianGenericFilter<args_info_type>::UpdateWithInputImageType()
         typename LaplacianImageFilterType::Pointer laplacianFilter=LaplacianImageFilterType::New();
         laplacianFilter->SetInput(castFilter->GetOutput());
         laplacianFilter->Update();
+        //std::cout<<"sigma value="<<laplacianFilter->GetSigma()<<std::endl;
         outputLaplacianFilter = laplacianFilter->GetOutput();
     }
     // Set iterator