X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=segmentation%2FclitkExtractLymphStationsFilter.txx;h=5f9bef0c1865923b1905d2cadf641e5a467d4838;hb=b90703922eaac265299057f6135e549538d65f06;hp=904bfc62011b684a9835d1c00f65b73553703df9;hpb=6c46b5b1d02d65fdb3fdccc8174346b49a05a32f;p=clitk.git diff --git a/segmentation/clitkExtractLymphStationsFilter.txx b/segmentation/clitkExtractLymphStationsFilter.txx index 904bfc6..5f9bef0 100644 --- a/segmentation/clitkExtractLymphStationsFilter.txx +++ b/segmentation/clitkExtractLymphStationsFilter.txx @@ -118,23 +118,13 @@ GenerateOutputInformation() { } // Extract Station8 - StartNewStep("Station 8"); - StartSubStep(); ExtractStation_8(); - StopSubStep(); // Extract Station3P - StartNewStep("Station 3P"); - StartSubStep(); ExtractStation_3P(); - StopSubStep(); // Extract Station3A - StartNewStep("Station 3A"); - StartSubStep(); ExtractStation_3A(); - StopSubStep(); - // HERE @@ -361,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 @@ -382,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