option "verbose" v "Verbose" flag off
option "verboseStep" - "Verbose each step" flag off
option "writeStep" w "Write image at each step" flag off
-option "verboseOption" - "Display options values" flag off
+option "verboseOptions" - "Display options values" flag off
option "imagetypes" - "Display allowed image types" flag off
section "Input/Output"
option "output" o "Output image filename" string yes
section "Main options"
-option "orientation" r "L R A P I S (LeftRightAntPostInfSup)" string no default="L"
+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 "threshold" t "Fuzzy threshold" double no default="0.6"
-option "not" n "Not flag : inverse of the orientation" flag off
+option "inverse" n "Not flag : inverse of the orientation" flag off
+option "doNotRemoveObject" - "if flag is on, do not remove the object" flag off
option "noAutoCrop" c "No auto crop at the end if set" flag off
+option "combineWithOr" - "Combine relpos map and support with OR" flag off
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
-
-
-
void clitk::RelativePositionGenericFilter<ArgsInfoType>::
SetOptionsFromArgsInfoToFilter(FilterType * f)
{
- f->SetVerboseOption(mArgsInfo.verbose_flag);
- f->SetVerboseStep(mArgsInfo.verboseStep_flag);
- f->SetWriteStep(mArgsInfo.writeStep_flag);
+ f->SetVerboseOptionFlag(mArgsInfo.verboseOptions_flag);
+ f->SetVerboseStepFlag(mArgsInfo.verboseStep_flag);
+ f->SetWriteStepFlag(mArgsInfo.writeStep_flag);
- if (mArgsInfo.orientation_given) {
- f->SetOrientationTypeString(mArgsInfo.orientation_arg);
+ for(uint i=0; i<mArgsInfo.orientation_given; i++) {
+ f->AddOrientationTypeString(mArgsInfo.orientation_arg[i]);
}
if (mArgsInfo.spacing_given) {
}
f->SetFuzzyThreshold(mArgsInfo.threshold_arg);
- f->SetNotFlag(mArgsInfo.not_flag);
+ f->SetRemoveObjectFlag(!mArgsInfo.doNotRemoveObject_flag);
f->SetAutoCropFlag(!mArgsInfo.noAutoCrop_flag);
+ f->SetCombineWithOrFlag(mArgsInfo.combineWithOr_flag);
+ f->SetInverseOrientationFlag(mArgsInfo.inverse_flag);
}
//--------------------------------------------------------------------
filter->SetInput(input);
filter->SetInputObject(object);
SetOptionsFromArgsInfoToFilter<FilterType>(filter);
- filter->SetDirection(mArgsInfo.direction_arg); // only for SliceBySliceRelativePositionFilter
+
+ // Set options only for SliceBySliceRelativePositionFilter
+ filter->SetDirection(mArgsInfo.direction_arg);
+ filter->SetUniqueConnectedComponentBySlice(mArgsInfo.uniqueCCL_flag);
// Go !
filter->Update();
// Set global Options
filter->SetInput(input);
filter->SetInputObject(object);
- filter->SetAngle1(mArgsInfo.angle1_arg);// only for this filter
- filter->SetAngle2(mArgsInfo.angle2_arg);
+ if (mArgsInfo.angle1_given && mArgsInfo.angle2_given)
+ filter->AddAngles(mArgsInfo.angle1_arg, mArgsInfo.angle2_arg);
SetOptionsFromArgsInfoToFilter<FilterType>(filter);
// Go !