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