From: David Sarrut Date: Fri, 29 Jul 2011 13:19:36 +0000 (+0200) Subject: Add options for threshold X-Git-Tag: v1.3.0~243 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=0d94c6c40728776ea1db6347a14606b044e25abc;p=clitk.git Add options for threshold --- diff --git a/segmentation/clitkExtractLymphStationsFilter.txx b/segmentation/clitkExtractLymphStationsFilter.txx index 520038c..5f9bef0 100644 --- a/segmentation/clitkExtractLymphStationsFilter.txx +++ b/segmentation/clitkExtractLymphStationsFilter.txx @@ -351,6 +351,17 @@ SetFuzzyThreshold(std::string station, std::string tag, double value) //-------------------------------------------------------------------- +//-------------------------------------------------------------------- +template +void +clitk::ExtractLymphStationsFilter:: +SetThreshold(std::string station, std::string tag, double value) +{ + m_Threshold[station][tag] = value; +} +//-------------------------------------------------------------------- + + //-------------------------------------------------------------------- template double @@ -372,6 +383,27 @@ GetFuzzyThreshold(std::string station, std::string tag) //-------------------------------------------------------------------- +//-------------------------------------------------------------------- +template +double +clitk::ExtractLymphStationsFilter:: +GetThreshold(std::string station, std::string tag) +{ + if (m_Threshold.find(station) == m_Threshold.end()) { + clitkExceptionMacro("Could not find options for station "+station+" in the list (while searching for tag "+tag+")."); + return 0.0; + } + + if (m_Threshold[station].find(tag) == m_Threshold[station].end()) { + clitkExceptionMacro("Could not find options "+tag+" in the list of Threshold for station "+station+"."); + return 0.0; + } + + return m_Threshold[station][tag]; +} +//-------------------------------------------------------------------- + + //-------------------------------------------------------------------- template void