Public Types | |
typedef IntLookupTablePropertyDeserializer | 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 | |
IntLookupTablePropertyDeserializer () | |
virtual | ~IntLookupTablePropertyDeserializer () |
Definition at line 30 of file mitkIntLookupTablePropertyDeserializer.cpp.
typedef itk::SmartPointer<const Self> mitk::IntLookupTablePropertyDeserializer::ConstPointer |
Reimplemented from mitk::BasePropertyDeserializer.
Definition at line 34 of file mitkIntLookupTablePropertyDeserializer.cpp.
typedef itk::SmartPointer<Self> mitk::IntLookupTablePropertyDeserializer::Pointer |
Reimplemented from mitk::BasePropertyDeserializer.
Definition at line 34 of file mitkIntLookupTablePropertyDeserializer.cpp.
Reimplemented from mitk::BasePropertyDeserializer.
Definition at line 34 of file mitkIntLookupTablePropertyDeserializer.cpp.
Reimplemented from mitk::BasePropertyDeserializer.
Definition at line 34 of file mitkIntLookupTablePropertyDeserializer.cpp.
mitk::IntLookupTablePropertyDeserializer::IntLookupTablePropertyDeserializer | ( | ) | [inline, protected] |
Definition at line 58 of file mitkIntLookupTablePropertyDeserializer.cpp.
{}
virtual mitk::IntLookupTablePropertyDeserializer::~IntLookupTablePropertyDeserializer | ( | ) | [inline, protected, virtual] |
Definition at line 59 of file mitkIntLookupTablePropertyDeserializer.cpp.
{}
virtual BaseProperty::Pointer mitk::IntLookupTablePropertyDeserializer::Deserialize | ( | TiXmlElement * | element ) | [inline, virtual] |
Reimplemented from mitk::BasePropertyDeserializer.
Definition at line 37 of file mitkIntLookupTablePropertyDeserializer.cpp.
References TiXmlNode::FirstChildElement(), mitk::IntLookupTableProperty::New(), TiXmlNode::NextSiblingElement(), mitk::GenericLookupTable< T >::SetTableValue(), and TIXML_WRONG_TYPE.
{ if (!element) return NULL; IntLookupTable lut; for( TiXmlElement* child = element->FirstChildElement("LUTValue"); child != NULL; child = child->NextSiblingElement("LUTValue")) { int temp; if (child->QueryIntAttribute("id", &temp) == TIXML_WRONG_TYPE) return NULL; // TODO: can we do a better error handling? IntLookupTable::IdentifierType id = static_cast<IntLookupTable::IdentifierType>(temp); if (child->QueryIntAttribute("value", &temp) == TIXML_WRONG_TYPE) return NULL; // TODO: can we do a better error handling? IntLookupTable::ValueType val = static_cast<IntLookupTable::ValueType>(temp); lut.SetTableValue(id, val); } return IntLookupTableProperty::New(lut).GetPointer(); }
virtual const char* mitk::IntLookupTablePropertyDeserializer::GetClassName | ( | ) | const [virtual] |
Reimplemented from mitk::BasePropertyDeserializer.
static Pointer mitk::IntLookupTablePropertyDeserializer::New | ( | ) | [static] |