From 3d2c3e7d196466f4cb71d056f4d977887d45014b Mon Sep 17 00:00:00 2001 From: David Sarrut Date: Mon, 25 Jul 2011 09:18:36 +0200 Subject: [PATCH] Add RemoveTag --- segmentation/clitkAnatomicalFeatureDatabase.cxx | 12 ++++++++++++ segmentation/clitkAnatomicalFeatureDatabase.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/segmentation/clitkAnatomicalFeatureDatabase.cxx b/segmentation/clitkAnatomicalFeatureDatabase.cxx index 2537622..c86b2df 100644 --- a/segmentation/clitkAnatomicalFeatureDatabase.cxx +++ b/segmentation/clitkAnatomicalFeatureDatabase.cxx @@ -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)); + } +} +//-------------------------------------------------------------------- diff --git a/segmentation/clitkAnatomicalFeatureDatabase.h b/segmentation/clitkAnatomicalFeatureDatabase.h index 574bf68..bd574d3 100644 --- a/segmentation/clitkAnatomicalFeatureDatabase.h +++ b/segmentation/clitkAnatomicalFeatureDatabase.h @@ -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; -- 2.47.1