]> Creatis software - clitk.git/commitdiff
Add RemoveTag
authorDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Mon, 25 Jul 2011 07:18:36 +0000 (09:18 +0200)
committerDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Mon, 25 Jul 2011 07:18:36 +0000 (09:18 +0200)
segmentation/clitkAnatomicalFeatureDatabase.cxx
segmentation/clitkAnatomicalFeatureDatabase.h

index 2537622a428588ad27aeba399c11b82e0de8444b..c86b2df07f7e4d056463861196589b9c7364ece0 100644 (file)
@@ -161,6 +161,7 @@ bool clitk::AnatomicalFeatureDatabase::TagExist(std::string tag)
 }
 //--------------------------------------------------------------------
 
+
 //-------------------------------------------------------------------- 
 void clitk::AnatomicalFeatureDatabase::SetDouble(std::string tag, double value)
 {
@@ -168,6 +169,7 @@ void clitk::AnatomicalFeatureDatabase::SetDouble(std::string tag, double value)
 }
 //-------------------------------------------------------------------- 
 
+
 //-------------------------------------------------------------------- 
 double clitk::AnatomicalFeatureDatabase::GetDouble(std::string tag)
 {
@@ -184,3 +186,13 @@ double clitk::AnatomicalFeatureDatabase::GetDouble(std::string tag)
   return a;  
 }
 //-------------------------------------------------------------------- 
+
+
+//-------------------------------------------------------------------- 
+void clitk::AnatomicalFeatureDatabase::RemoveTag(TagType tag)
+{
+  if (TagExist(tag)) {
+    m_MapOfTag.erase(m_MapOfTag.find(tag));
+  }
+}
+//-------------------------------------------------------------------- 
index 574bf682ff34d93e4640b12e54cb070d7966bd67..bd574d384fa3107f7bc5aea8628c65bc893574fd 100644 (file)
@@ -65,6 +65,9 @@ namespace clitk {
     // Set Get Double
     void SetDouble(TagType tag, double d);
     double GetDouble(TagType tag);
+    
+    // Remove Tag
+    void RemoveTag(TagType tag);
 
   protected:
     std::string m_Filename;