From: David Sarrut Date: Thu, 14 Jun 2012 13:38:03 +0000 (+0200) Subject: Only compute overlap if check is not set as option X-Git-Tag: v1.3.0~27^2~4 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=1764a8253047b601b6a9152573e9859c25e4347d;p=clitk.git Only compute overlap if check is not set as option --- 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();