17 #ifndef mitkPoint3iPropertySerializer_h_included
18 #define mitkPoint3iPropertySerializer_h_included
25 class Point3iPropertySerializer :
public BasePropertySerializer
29 itkFactorylessNewMacro(Self) itkCloneMacro(Self)
31 virtual TiXmlElement *Serialize()
override
33 if (
const Point3iProperty *prop = dynamic_cast<const Point3iProperty *>(m_Property.GetPointer()))
35 auto element =
new TiXmlElement(
"point");
36 Point3I point = prop->GetValue();
37 element->SetAttribute(
"x", point[0]);
38 element->SetAttribute(
"y", point[1]);
39 element->SetAttribute(
"z", point[2]);
52 if (element->QueryIntAttribute(
"x", &v[0]) != TIXML_SUCCESS)
54 if (element->QueryIntAttribute(
"y", &v[1]) != TIXML_SUCCESS)
56 if (element->QueryIntAttribute(
"z", &v[2]) != TIXML_SUCCESS)
62 Point3iPropertySerializer() {}
63 virtual ~Point3iPropertySerializer() {}
DataCollection - Class to facilitate loading/accessing structured data.
itk::SmartPointer< Self > Pointer
#define mitkClassMacro(className, SuperClassName)
MITK_REGISTER_SERIALIZER(Point3iPropertySerializer)