From 1764a8253047b601b6a9152573e9859c25e4347d Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Thu, 14 Jun 2012 15:38:03 +0200 Subject: [PATCH] Only compute overlap if check is not set as option --- segmentation/clitkStructuresExtractionFilter.txx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/segmentation/clitkStructuresExtractionFilter.txx b/segmentation/clitkStructuresExtractionFilter.txx index 9559d4c..d785861 100644 --- a/segmentation/clitkStructuresExtractionFilter.txx +++ b/segmentation/clitkStructuresExtractionFilter.txx @@ -52,6 +52,7 @@ ApplyRelativePositionList(std::string name, MaskImageType * input, bool overlap) // Create all RelativePositionList for(unsigned int i=0; iSetDisplayUsedStructuresOnlyFlag(this->GetDisplayUsedStructuresOnlyFlag()); rpl->SetAFDB(GetAFDB()); rpl->Read(mListOfRelativePositionListFilename[i]); std::string s = rpl->GetInputName(); @@ -71,9 +72,9 @@ ApplyRelativePositionList(std::string name, MaskImageType * input, bool overlap) relpos->SetCurrentStepNumber(GetCurrentStepNumber()); relpos->SetWriteStepFlag(GetWriteStepFlag()); relpos->SetInput(input); - if (overlap) { - std::string n = name.substr(8,2); - MaskImagePointer ref = this->GetAFDB()->template GetImage ("S"+n+"_Ref"); + if (!this->GetDisplayUsedStructuresOnlyFlag() && overlap) { + std::string n = name.substr(8,3); + MaskImagePointer ref = this->GetAFDB()->template GetImage (n+"_Ref"); relpos->SetReferenceImageForOverlapMeasure(ref); } relpos->Update(); -- 2.47.1