|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Serializes and deserializes VectorProperty instances to/from XML. More...
#include <mitkVectorPropertySerializer.h>


Public Types | |
| typedef VectorProperty< DATATYPE > | PropertyType |
| typedef VectorPropertySerializer< DATATYPE > | Self |
| typedef BasePropertySerializer | SuperClass |
| typedef itk::SmartPointer< Self > | Pointer |
| typedef itk::SmartPointer< const Self > | ConstPointer |
Public Member Functions | |
| std::vector< std::string > | GetClassHierarchy () const override |
| const char * | GetNameOfClass () const override |
| Pointer | Clone () const |
| tinyxml2::XMLElement * | Serialize (tinyxml2::XMLDocument &doc) override |
| Serializes the VectorProperty into an XML "Values" element. More... | |
| BaseProperty::Pointer | Deserialize (const tinyxml2::XMLElement *listElement) override |
| Deserializes an XML "Values" element back into a VectorProperty. More... | |
Public Member Functions inherited from mitk::BasePropertySerializer | |
| mitkClassMacroItkParent (BasePropertySerializer, itk::Object) | |
| virtual void | SetProperty (const BaseProperty *_arg) |
| Sets the property to be serialized. More... | |
Static Public Member Functions | |
| static const char * | GetStaticNameOfClass () |
| static Pointer | New () |
Additional Inherited Members | |
Protected Member Functions inherited from mitk::BasePropertySerializer | |
| BasePropertySerializer () | |
| ~BasePropertySerializer () override | |
Protected Attributes inherited from mitk::BasePropertySerializer | |
| BaseProperty::ConstPointer | m_Property |
Serializes and deserializes VectorProperty instances to/from XML.
Converts a VectorProperty (a vector of values of type DATATYPE) into an XML structure and back. The XML format is:
* <Values> * <Value idx="0" value="17.3"/> * <Value idx="1" value="7.2"/> * <Value idx="2" value="-17.3"/> * </Values> *
This class is implemented as a template and uses boost::lexical_cast for conversions between specific data types and strings.
| DATATYPE | The element type stored in the VectorProperty (e.g., double, int). |
Definition at line 51 of file mitkVectorPropertySerializer.h.
| typedef itk::SmartPointer<const Self> mitk::VectorPropertySerializer< DATATYPE >::ConstPointer |
Definition at line 62 of file mitkVectorPropertySerializer.h.
| typedef itk::SmartPointer<Self> mitk::VectorPropertySerializer< DATATYPE >::Pointer |
Definition at line 61 of file mitkVectorPropertySerializer.h.
| typedef VectorProperty<DATATYPE> mitk::VectorPropertySerializer< DATATYPE >::PropertyType |
Definition at line 58 of file mitkVectorPropertySerializer.h.
| typedef VectorPropertySerializer<DATATYPE> mitk::VectorPropertySerializer< DATATYPE >::Self |
Definition at line 59 of file mitkVectorPropertySerializer.h.
| typedef BasePropertySerializer mitk::VectorPropertySerializer< DATATYPE >::SuperClass |
Definition at line 60 of file mitkVectorPropertySerializer.h.
| Pointer mitk::VectorPropertySerializer< DATATYPE >::Clone | ( | ) | const |
|
inlineoverridevirtual |
Deserializes an XML "Values" element back into a VectorProperty.
Reads child "Value" elements, parses each "value" attribute using boost::lexical_cast, and constructs a new VectorProperty containing the parsed values.
| [in] | listElement | The XML "Values" element to deserialize. May be nullptr. |
Reimplemented from mitk::BasePropertySerializer.
Definition at line 128 of file mitkVectorPropertySerializer.h.
References MITK_ERROR.
|
inlineoverride |
Definition at line 63 of file mitkVectorPropertySerializer.h.
|
inlineoverride |
Definition at line 75 of file mitkVectorPropertySerializer.h.
|
inlinestatic |
Definition at line 67 of file mitkVectorPropertySerializer.h.
|
static |
|
inlineoverridevirtual |
Serializes the VectorProperty into an XML "Values" element.
Each element of the vector is stored as a child element with an "idx" attribute (zero-based index) and a "value" attribute (string representation of the numeric value).
| [in,out] | doc | The XML document used to create elements. |
Reimplemented from mitk::BasePropertySerializer.
Definition at line 90 of file mitkVectorPropertySerializer.h.