]> Creatis software - clitk.git/commitdiff
add enlarge capability
authordsarrut <dsarrut>
Wed, 15 Dec 2010 08:54:02 +0000 (08:54 +0000)
committerdsarrut <dsarrut>
Wed, 15 Dec 2010 08:54:02 +0000 (08:54 +0000)
tools/clitkCropImage.ggo
tools/clitkCropImageGenericFilter.txx

index 01a19b3dc00cfdf8ab4ca26a950fee51611ddffe..4931b5b1c57903c278de9c5480eb95257c89e903 100755 (executable)
@@ -25,6 +25,8 @@ option "BG"           -       "Background value in input."      double default="0" no
 
 section "Crop like another image"
 option "like"          -       "Crop like this image (must have the same spacing"   string no
+option "BGLike"                -       "Background value in output (if like larger)"        double default="0" no
+
 
 
 
index 89aeabc4cfce965ff1b4709d9d71530dd97f915c..8d2a23924f7b36af861ef6129143d8cb32bb7693 100755 (executable)
@@ -25,7 +25,7 @@ clitk::CropImageGenericFilter<ArgsInfoType>::CropImageGenericFilter():
 {
   // Default values
   cmdline_parser_clitkCropImage_init(&mArgsInfo);
-  //InitializeImageType<2>();
+  InitializeImageType<2>();
   InitializeImageType<3>();
   InitializeImageType<4>();
 }
@@ -106,6 +106,7 @@ void clitk::CropImageGenericFilter<ArgsInfoType>::UpdateWithInputImageType()
       typename FilterType::Pointer filter = FilterType::New();
       filter->SetInput(input);
       filter->SetCropLikeFilename(mArgsInfo.like_arg);
+      filter->SetBackgroundValue(mArgsInfo.BGLike_arg);
       filter->Update();
       output = filter->GetOutput();
     }