

Public Types | |
| typedef FloatLookupTablePropertySerializer | Self |
| typedef BasePropertySerializer | Superclass |
| typedef itk::SmartPointer< Self > | Pointer |
| typedef itk::SmartPointer < const Self > | ConstPointer |
Public Member Functions | |
| virtual const char * | GetClassName () const |
| virtual TiXmlElement * | Serialize () |
| Serializes given BaseProperty object. | |
Static Public Member Functions | |
| static Pointer | New () |
Protected Member Functions | |
| FloatLookupTablePropertySerializer () | |
| virtual | ~FloatLookupTablePropertySerializer () |
Definition at line 30 of file mitkFloatLookupTablePropertySerializer.cpp.
| typedef itk::SmartPointer<const Self> mitk::FloatLookupTablePropertySerializer::ConstPointer |
Reimplemented from mitk::BasePropertySerializer.
Definition at line 34 of file mitkFloatLookupTablePropertySerializer.cpp.
| typedef itk::SmartPointer<Self> mitk::FloatLookupTablePropertySerializer::Pointer |
Reimplemented from mitk::BasePropertySerializer.
Definition at line 34 of file mitkFloatLookupTablePropertySerializer.cpp.
Reimplemented from mitk::BasePropertySerializer.
Definition at line 34 of file mitkFloatLookupTablePropertySerializer.cpp.
Reimplemented from mitk::BasePropertySerializer.
Definition at line 34 of file mitkFloatLookupTablePropertySerializer.cpp.
| mitk::FloatLookupTablePropertySerializer::FloatLookupTablePropertySerializer | ( | ) | [inline, protected] |
Definition at line 58 of file mitkFloatLookupTablePropertySerializer.cpp.
{}
| virtual mitk::FloatLookupTablePropertySerializer::~FloatLookupTablePropertySerializer | ( | ) | [inline, protected, virtual] |
Definition at line 59 of file mitkFloatLookupTablePropertySerializer.cpp.
{}
| virtual const char* mitk::FloatLookupTablePropertySerializer::GetClassName | ( | ) | const [virtual] |
Reimplemented from mitk::BasePropertySerializer.
| static Pointer mitk::FloatLookupTablePropertySerializer::New | ( | ) | [static] |
| virtual TiXmlElement* mitk::FloatLookupTablePropertySerializer::Serialize | ( | ) | [inline, virtual] |
Serializes given BaseProperty object.
This should be overwritten by specific sub-classes.
Reimplemented from mitk::BasePropertySerializer.
Definition at line 37 of file mitkFloatLookupTablePropertySerializer.cpp.
References mitk::GenericLookupTable< T >::GetLookupTable(), mitk::GenericProperty< T >::GetValue(), TiXmlNode::LinkEndChild(), TiXmlElement::SetAttribute(), and TiXmlElement::SetDoubleAttribute().
{
const FloatLookupTableProperty* prop = dynamic_cast<const FloatLookupTableProperty*>(m_Property.GetPointer());
if (prop == NULL)
return NULL;
FloatLookupTable lut = prop->GetValue();
//if (lut.IsNull())
// return NULL; // really?
const FloatLookupTable::LookupTableType& map = lut.GetLookupTable();
TiXmlElement* element = new TiXmlElement("FloatLookupTableTable");
for (FloatLookupTable::LookupTableType::const_iterator it = map.begin(); it != map.end(); ++it)
{
TiXmlElement* tableEntry = new TiXmlElement("LUTValue");
tableEntry->SetAttribute("id", it->first);
tableEntry->SetDoubleAttribute("value", static_cast<double>(it->second));
element->LinkEndChild( tableEntry );
}
return element;
}
1.7.2