Public Types | |
typedef LevelWindowPropertySerializer | 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 | |
LevelWindowPropertySerializer () | |
virtual | ~LevelWindowPropertySerializer () |
Definition at line 30 of file mitkLevelWindowPropertySerializer.cpp.
typedef itk::SmartPointer<const Self> mitk::LevelWindowPropertySerializer::ConstPointer |
Reimplemented from mitk::BasePropertySerializer.
Definition at line 34 of file mitkLevelWindowPropertySerializer.cpp.
typedef itk::SmartPointer<Self> mitk::LevelWindowPropertySerializer::Pointer |
Reimplemented from mitk::BasePropertySerializer.
Definition at line 34 of file mitkLevelWindowPropertySerializer.cpp.
Reimplemented from mitk::BasePropertySerializer.
Definition at line 34 of file mitkLevelWindowPropertySerializer.cpp.
Reimplemented from mitk::BasePropertySerializer.
Definition at line 34 of file mitkLevelWindowPropertySerializer.cpp.
mitk::LevelWindowPropertySerializer::LevelWindowPropertySerializer | ( | ) | [inline, protected] |
Definition at line 72 of file mitkLevelWindowPropertySerializer.cpp.
{}
virtual mitk::LevelWindowPropertySerializer::~LevelWindowPropertySerializer | ( | ) | [inline, protected, virtual] |
Definition at line 73 of file mitkLevelWindowPropertySerializer.cpp.
{}
virtual const char* mitk::LevelWindowPropertySerializer::GetClassName | ( | ) | const [virtual] |
Reimplemented from mitk::BasePropertySerializer.
static Pointer mitk::LevelWindowPropertySerializer::New | ( | ) | [static] |
virtual TiXmlElement* mitk::LevelWindowPropertySerializer::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 mitkLevelWindowPropertySerializer.cpp.
References mitk::LevelWindow::GetDefaultLevel(), mitk::LevelWindow::GetDefaultWindow(), mitk::LevelWindow::GetLevel(), mitk::LevelWindow::GetRangeMax(), mitk::LevelWindow::GetRangeMin(), mitk::LevelWindow::GetWindow(), mitk::LevelWindow::IsFixed(), TiXmlNode::LinkEndChild(), TiXmlElement::SetAttribute(), and TiXmlElement::SetDoubleAttribute().
{ if (const LevelWindowProperty* prop = dynamic_cast<const LevelWindowProperty*>(m_Property.GetPointer())) { TiXmlElement* element = new TiXmlElement("LevelWindow"); LevelWindow lw = prop->GetLevelWindow(); std::string boolString("false"); if (lw.IsFixed() == true) boolString = "true"; element->SetAttribute("fixed", boolString.c_str()); TiXmlElement* child = new TiXmlElement("CurrentSettings"); element->LinkEndChild( child ); child->SetDoubleAttribute("level", lw.GetLevel()); child->SetDoubleAttribute("window", lw.GetWindow()); child = new TiXmlElement("DefaultSettings"); element->LinkEndChild( child ); child->SetDoubleAttribute("level", lw.GetDefaultLevel()); child->SetDoubleAttribute("window", lw.GetDefaultWindow()); child = new TiXmlElement("CurrentRange"); element->LinkEndChild( child ); child->SetDoubleAttribute("min", lw.GetRangeMin()); child->SetDoubleAttribute("max", lw.GetRangeMax()); return element; } else return NULL; }