From 4958449389240b49cc03f488762a9bd52ee43e6d Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Fri, 4 Nov 2011 10:28:05 +0100 Subject: [PATCH] Change output display --- segmentation/clitkRelativePositionList.txx | 34 ++++++++++++++++------ 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/segmentation/clitkRelativePositionList.txx b/segmentation/clitkRelativePositionList.txx index ec49a54..7a53a99 100644 --- a/segmentation/clitkRelativePositionList.txx +++ b/segmentation/clitkRelativePositionList.txx @@ -146,10 +146,12 @@ GenerateOutputInformation() { // Loop on RelativePositionList of operations std::string s = GetInputName(); for(uint i=0; i:: SetFilterOptions(typename RelPosFilterType::Pointer filter, ArgsInfoType & options) { - if (options.orientation_given != 1) { - DD("ERRROR DEBUG TODO no more than 1 orientation yet"); - exit(0); + if (options.orientation_given > 1) { + clitkExceptionMacro("Error in the RelPos options. I need a single --orientation (for the moment)." + << " Current options are for obj = '" << options.object_arg + << "', threshold = " << options.threshold_arg << std::endl); } ImagePointer object = GetAFDB()->template GetImage(options.object_arg); @@ -222,8 +225,21 @@ SetFilterOptions(typename RelPosFilterType::Pointer filter, ArgsInfoType & optio filter->SetVerboseImageSizeFlag(GetVerboseImageSizeFlag()); filter->SetFuzzyThreshold(options.threshold_arg); filter->SetInverseOrientationFlag(options.inverse_flag); // MUST BE BEFORE AddOrientationTypeString - for(uint i=0; iAddOrientationTypeString(options.orientation_arg[i]); + + if (options.orientation_given == 1) { + for(uint i=0; iAddOrientationTypeString(options.orientation_arg[i]); + } + else { + if (options.angle1_given && options.angle2_given) { + filter->AddAnglesInDeg(options.angle1_arg, options.angle2_arg); + } + else { + clitkExceptionMacro("Error in the RelPos options. I need --orientation or (--angle1 and --angle2)." + << " Current options are for obj = '" << options.object_arg + << "', threshold = " << options.threshold_arg << std::endl); + } + } filter->SetIntermediateSpacing(options.spacing_arg); if (options.spacing_arg == -1) filter->IntermediateSpacingFlagOff(); else filter->IntermediateSpacingFlagOn(); -- 2.47.1