

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