Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions

mitk::LevelWindowPropertySerializer Class Reference

Inheritance diagram for mitk::LevelWindowPropertySerializer:
Inheritance graph
[legend]
Collaboration diagram for mitk::LevelWindowPropertySerializer:
Collaboration graph
[legend]

List of all members.

Public Types

typedef
LevelWindowPropertySerializer 
Self
typedef BasePropertySerializer Superclass
typedef itk::SmartPointer< SelfPointer
typedef itk::SmartPointer
< const Self
ConstPointer

Public Member Functions

virtual const char * GetClassName () const
virtual TiXmlElementSerialize ()
 Serializes given BaseProperty object.

Static Public Member Functions

static Pointer New ()

Protected Member Functions

 LevelWindowPropertySerializer ()
virtual ~LevelWindowPropertySerializer ()

Detailed Description

Definition at line 30 of file mitkLevelWindowPropertySerializer.cpp.


Member Typedef Documentation

typedef itk::SmartPointer<const Self> mitk::LevelWindowPropertySerializer::ConstPointer

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.

Reimplemented from mitk::BasePropertySerializer.

Definition at line 34 of file mitkLevelWindowPropertySerializer.cpp.


Constructor & Destructor Documentation

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.

{}

Member Function Documentation

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.

Returns:
the filename of the newly created file.

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;
    }

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines