From 04b38827ad4a4c82553f01cfe62adc4abb19400a Mon Sep 17 00:00:00 2001 From: dsarrut Date: Wed, 15 Dec 2010 08:54:02 +0000 Subject: [PATCH] add enlarge capability --- tools/clitkCropImage.ggo | 2 ++ tools/clitkCropImageGenericFilter.txx | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/clitkCropImage.ggo b/tools/clitkCropImage.ggo index 01a19b3..4931b5b 100755 --- a/tools/clitkCropImage.ggo +++ b/tools/clitkCropImage.ggo @@ -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 + diff --git a/tools/clitkCropImageGenericFilter.txx b/tools/clitkCropImageGenericFilter.txx index 89aeabc..8d2a239 100755 --- a/tools/clitkCropImageGenericFilter.txx +++ b/tools/clitkCropImageGenericFilter.txx @@ -25,7 +25,7 @@ clitk::CropImageGenericFilter::CropImageGenericFilter(): { // Default values cmdline_parser_clitkCropImage_init(&mArgsInfo); - //InitializeImageType<2>(); + InitializeImageType<2>(); InitializeImageType<3>(); InitializeImageType<4>(); } @@ -106,6 +106,7 @@ void clitk::CropImageGenericFilter::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(); } -- 2.47.1