]> Creatis software - clitk.git/commitdiff
Add options for threshold
authorDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Fri, 29 Jul 2011 13:19:36 +0000 (15:19 +0200)
committerDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Fri, 29 Jul 2011 13:19:36 +0000 (15:19 +0200)
segmentation/clitkExtractLymphStationsFilter.txx

index 520038c89785c58abc9eab9b8a35c8bb1c4bbaae..5f9bef0c1865923b1905d2cadf641e5a467d4838 100644 (file)
@@ -351,6 +351,17 @@ SetFuzzyThreshold(std::string station, std::string tag, double value)
 //--------------------------------------------------------------------
 
 
+//--------------------------------------------------------------------
+template <class TImageType>
+void 
+clitk::ExtractLymphStationsFilter<TImageType>::
+SetThreshold(std::string station, std::string tag, double value)
+{
+  m_Threshold[station][tag] = value;
+}
+//--------------------------------------------------------------------
+
+
 //--------------------------------------------------------------------
 template <class TImageType>
 double 
@@ -372,6 +383,27 @@ GetFuzzyThreshold(std::string station, std::string tag)
 //--------------------------------------------------------------------
 
 
+//--------------------------------------------------------------------
+template <class TImageType>
+double 
+clitk::ExtractLymphStationsFilter<TImageType>::
+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 <class TImageType>
 void