

Public Types | |
| typedef BoolLookupTablePropertySerializer | 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 | |
| BoolLookupTablePropertySerializer () | |
| virtual | ~BoolLookupTablePropertySerializer () |
Definition at line 30 of file mitkBoolLookupTablePropertySerializer.cpp.
| typedef itk::SmartPointer<const Self> mitk::BoolLookupTablePropertySerializer::ConstPointer |
Reimplemented from mitk::BasePropertySerializer.
Definition at line 34 of file mitkBoolLookupTablePropertySerializer.cpp.
| typedef itk::SmartPointer<Self> mitk::BoolLookupTablePropertySerializer::Pointer |
Reimplemented from mitk::BasePropertySerializer.
Definition at line 34 of file mitkBoolLookupTablePropertySerializer.cpp.
Reimplemented from mitk::BasePropertySerializer.
Definition at line 34 of file mitkBoolLookupTablePropertySerializer.cpp.
Reimplemented from mitk::BasePropertySerializer.
Definition at line 34 of file mitkBoolLookupTablePropertySerializer.cpp.
| mitk::BoolLookupTablePropertySerializer::BoolLookupTablePropertySerializer | ( | ) | [inline, protected] |
Definition at line 61 of file mitkBoolLookupTablePropertySerializer.cpp.
{}
| virtual mitk::BoolLookupTablePropertySerializer::~BoolLookupTablePropertySerializer | ( | ) | [inline, protected, virtual] |
Definition at line 62 of file mitkBoolLookupTablePropertySerializer.cpp.
{}
| virtual const char* mitk::BoolLookupTablePropertySerializer::GetClassName | ( | ) | const [virtual] |
Reimplemented from mitk::BasePropertySerializer.
| static Pointer mitk::BoolLookupTablePropertySerializer::New | ( | ) | [static] |
| virtual TiXmlElement* mitk::BoolLookupTablePropertySerializer::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 mitkBoolLookupTablePropertySerializer.cpp.
References mitk::GenericLookupTable< T >::GetLookupTable(), mitk::GenericProperty< T >::GetValue(), TiXmlNode::LinkEndChild(), and TiXmlElement::SetAttribute().
{
const BoolLookupTableProperty* prop = dynamic_cast<const BoolLookupTableProperty*>(m_Property.GetPointer());
if (prop == NULL)
return NULL;
BoolLookupTable lut = prop->GetValue();
//if (lut.IsNull())
// return NULL; // really?
const BoolLookupTable::LookupTableType& map = lut.GetLookupTable();
TiXmlElement* element = new TiXmlElement("BoolLookupTable");
for (BoolLookupTable::LookupTableType::const_iterator it = map.begin(); it != map.end(); ++it)
{
TiXmlElement* tableEntry = new TiXmlElement("LUTValue");
tableEntry->SetAttribute("id", it->first);
if (it->second == true)
tableEntry->SetAttribute("value", "true");
else
tableEntry->SetAttribute("value", "false");
element->LinkEndChild( tableEntry );
}
return element;
}
1.7.2