From: David Sarrut Date: Mon, 26 Sep 2011 07:05:30 +0000 (+0200) Subject: Small options modification X-Git-Tag: v1.3.0~225 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=e4ac56284be05b6a3c850546d51f2d41347676ba;p=clitk.git Small options modification --- diff --git a/tools/clitkRelativePosition.ggo b/tools/clitkRelativePosition.ggo index 2192012..bc3f511 100644 --- a/tools/clitkRelativePosition.ggo +++ b/tools/clitkRelativePosition.ggo @@ -20,7 +20,7 @@ section "Main options" option "orientation" r "L R A P I S (LeftRightAntPostInfSup)" string no multiple default="L" option "angle1" a "Angle 1 (deg)" double no default="0" option "angle2" b "Angle 2 (deg)" double no default="0" -option "spacing" s "Resample before (faster)" double no +option "spacing" s "Resample before (faster) (-1 if not resampling" double default = "-1" no option "threshold" t "Fuzzy threshold" double no default="0.6" option "inverse" n "Not flag : inverse of the orientation" flag off option "doNotRemoveObject" - "if flag is on, do not remove the object" flag off @@ -31,5 +31,6 @@ section "Slice by slice processing" option "sliceBySlice" - "Slice by slice relative position" flag off option "direction" d "If SbS, indicate the slice direction" int no default="2" option "uniqueCCL" u "Keep only one CC in each slice" flag off +option "uniqueObjectCCL" - "Keep only one CC in each object slice" flag off diff --git a/tools/clitkRelativePositionGenericFilter.txx b/tools/clitkRelativePositionGenericFilter.txx index 6e4814f..66c4be4 100644 --- a/tools/clitkRelativePositionGenericFilter.txx +++ b/tools/clitkRelativePositionGenericFilter.txx @@ -77,12 +77,16 @@ SetOptionsFromArgsInfoToFilter(FilterType * f) f->IntermediateSpacingFlagOn(); f->SetIntermediateSpacing(mArgsInfo.spacing_arg); } + else { + f->IntermediateSpacingFlagOff(); + } f->SetFuzzyThreshold(mArgsInfo.threshold_arg); f->SetRemoveObjectFlag(!mArgsInfo.doNotRemoveObject_flag); f->SetAutoCropFlag(!mArgsInfo.noAutoCrop_flag); f->SetCombineWithOrFlag(mArgsInfo.combineWithOr_flag); f->SetInverseOrientationFlag(mArgsInfo.inverse_flag); + } //-------------------------------------------------------------------- @@ -112,7 +116,13 @@ UpdateWithInputImageType() // Set options only for SliceBySliceRelativePositionFilter filter->SetDirection(mArgsInfo.direction_arg); - filter->SetUniqueConnectedComponentBySlice(mArgsInfo.uniqueCCL_flag); + filter->SetUniqueConnectedComponentBySliceFlag(mArgsInfo.uniqueCCL_flag); + if (mArgsInfo.uniqueObjectCCL_flag) { + filter->UseTheLargestObjectCCLFlagOn(); + } + else { + filter->UseTheLargestObjectCCLFlagOff(); + } // Go ! filter->Update();