Public Types | |
typedef BoolLookupTablePropertyDeserializer | Self |
typedef BasePropertyDeserializer | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer < const Self > | ConstPointer |
Public Member Functions | |
virtual const char * | GetClassName () const |
virtual BaseProperty::Pointer | Deserialize (TiXmlElement *element) |
Static Public Member Functions | |
static Pointer | New () |
Protected Member Functions | |
BoolLookupTablePropertyDeserializer () | |
virtual | ~BoolLookupTablePropertyDeserializer () |
Definition at line 30 of file mitkBoolLookupTablePropertyDeserializer.cpp.
typedef itk::SmartPointer<const Self> mitk::BoolLookupTablePropertyDeserializer::ConstPointer |
Reimplemented from mitk::BasePropertyDeserializer.
Definition at line 34 of file mitkBoolLookupTablePropertyDeserializer.cpp.
typedef itk::SmartPointer<Self> mitk::BoolLookupTablePropertyDeserializer::Pointer |
Reimplemented from mitk::BasePropertyDeserializer.
Definition at line 34 of file mitkBoolLookupTablePropertyDeserializer.cpp.
Reimplemented from mitk::BasePropertyDeserializer.
Definition at line 34 of file mitkBoolLookupTablePropertyDeserializer.cpp.
Reimplemented from mitk::BasePropertyDeserializer.
Definition at line 34 of file mitkBoolLookupTablePropertyDeserializer.cpp.
mitk::BoolLookupTablePropertyDeserializer::BoolLookupTablePropertyDeserializer | ( | ) | [inline, protected] |
Definition at line 57 of file mitkBoolLookupTablePropertyDeserializer.cpp.
{}
virtual mitk::BoolLookupTablePropertyDeserializer::~BoolLookupTablePropertyDeserializer | ( | ) | [inline, protected, virtual] |
Definition at line 58 of file mitkBoolLookupTablePropertyDeserializer.cpp.
{}
virtual BaseProperty::Pointer mitk::BoolLookupTablePropertyDeserializer::Deserialize | ( | TiXmlElement * | element ) | [inline, virtual] |
Reimplemented from mitk::BasePropertyDeserializer.
Definition at line 37 of file mitkBoolLookupTablePropertyDeserializer.cpp.
References TiXmlNode::FirstChildElement(), mitk::BoolLookupTableProperty::New(), TiXmlNode::NextSiblingElement(), mitk::GenericLookupTable< T >::SetTableValue(), and TIXML_WRONG_TYPE.
{ if (!element) return NULL; BoolLookupTable lut; for( TiXmlElement* child = element->FirstChildElement("LUTValue"); child != NULL; child = child->NextSiblingElement("LUTValue")) { int xmlID; if (child->QueryIntAttribute("id", &xmlID) == TIXML_WRONG_TYPE) return NULL; // TODO: can we do a better error handling? BoolLookupTable::IdentifierType id = static_cast<BoolLookupTable::IdentifierType>(xmlID); BoolLookupTable::ValueType val = std::string(child->Attribute("value")) == std::string("true"); lut.SetTableValue(id, val); } return BoolLookupTableProperty::New(lut).GetPointer(); }
virtual const char* mitk::BoolLookupTablePropertyDeserializer::GetClassName | ( | ) | const [virtual] |
Reimplemented from mitk::BasePropertyDeserializer.
static Pointer mitk::BoolLookupTablePropertyDeserializer::New | ( | ) | [static] |